Spiral's avatar

Giving logs issue on fresh installation of laravel with jetstream livewire

I have installed new project then

composer require laravel/jetstream php artisan jetstream:install livewire npm install when I run then npm run dev then giving this issue can you explain me why giving this issue

HP@DESKTOP-5AMTC38 MINGW64 /e/wamp64/www/Laravel8Projects/Laravel_Livewire_JetStream_Projects/jetstream_blog
$ npm run dev

> @ dev E:\wamp64\www\Laravel8Projects\Laravel_Livewire_JetStream_Projects\jetstream_blog
> npm run development


> @ development E:\wamp64\www\Laravel8Projects\Laravel_Livewire_JetStream_Projects\jetstream_blog
> mix

'mix' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ development: `mix`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ development script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs21-01-18T13_22_31_264Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: `npm run development`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\HP\AppData\Roaming\npm-cache\_logs21-01-18T13_22_31_295Z-debug.log
0 likes
9 replies
CorvS's avatar

Can you show us your package.json? Is laravel-mix in there?

1 like
Spiral's avatar

Thanks, brother for replying to me...

You can check my package.json file

    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "mix",
        "watch": "mix watch",
        "watch-poll": "mix watch -- --watch-options-poll=1000",
        "hot": "mix watch --hot",
        "prod": "npm run production",
        "production": "mix --production"
    },
    "devDependencies": {
        "@tailwindcss/forms": "^0.2.1",
        "@tailwindcss/typography": "^0.3.0",
        "alpinejs": "^2.7.3",
        "autoprefixer": "^10.0.2",
        "axios": "^0.21",
        "cross-env": "^7.0.3",
        "laravel-mix": "^6.0.6",
        "lodash": "^4.17.19",
        "postcss": "^8.1.14",
        "postcss-import": "^12.0.1",
        "tailwindcss": "^2.0.1"
    }
}
CorvS's avatar

Have you tried removing the node_modules directory and running npm install again? Does npm install show any errors/warnings?

1 like
Spiral's avatar
rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install

I have try these command many time but not luck

Spiral's avatar

Yes I have remove node_modules many time and run again npm install but not solving this issue giving same issue

shaungbhone's avatar

rm -rf node_modules

yarn install

npm run dev

Try this. I hope it will work. Thanks

1 like
shaungbhone's avatar

sorry my mistake type like this.

yarn install && npm run dev

thinkverse's avatar

Make sure your node version is up-to-date with the requirements of Laravel-Mix, which as of the current release - version 6, is node >= 12.14.0, version 5 was node >= 8.9.0.

Please or to participate in this conversation.