Laravel-mix: Laravel-Mix npm run dev syntax error!

Created on 3 May 2017  路  11Comments  路  Source: JeffreyWay/laravel-mix

debuglog.txt.txt

@ dev C:\xampp\htdocs\projectsmelungtse
cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js

undefined:1

SyntaxError: Unexpected token

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "dev"
npm ERR! node v6.10.3
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! @ dev: cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ dev script 'cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\xampp\htdocs\projectsmelungtsenpm-debug.log

And my NODE is 6.10.3
NPM is 3.10.10
OS Windows 10

Most helpful comment

@ravisharmaa try deleting the mix-manifest.json file from /public and report if it fixed it

All 11 comments

Upgrade npm.

@ruchern done !! already and it says it is in version 3.10.10

@JeffreyWay After I have updated npm and node what is the is solution to these problems???

I don't know. You ignored the issue template and haven't given me enough information.

@JeffreyWay My brother was having this exact same issue after he got Blue Screen on windows and restarted. After a lot of debugging and thinking it was npm i went into the code and found where it was breaking.

Manifest.js -> this.read()

it was finding a mix-manifest.json file but it was empty for some reason and because the JSON was invalid it was throwing that error. so maybe a try catch around that. Just say the word and ill make a PR

@ravisharmaa try deleting the mix-manifest.json file from /public and report if it fixed it

OMG!! thanks dude @spearmootz , it's workin!

Welcome my dude @andikahmadr7

@spearmootz Thanks. It solved my problem.

just trying to delete mix-manifest.json from /public folder and run npm run watch again.

@spearmootz thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rderimay picture rderimay  路  3Comments

Bomavi picture Bomavi  路  3Comments

nezaboravi picture nezaboravi  路  3Comments

pixieaka picture pixieaka  路  3Comments

rlewkowicz picture rlewkowicz  路  3Comments