Sudden "npm run dev" error after update to 0.8.3 (0.8.1 still works)
See original GitHub issue- Laravel Mix Version: 0.8.3
- Node Version (
node -v
): 7.6.0 - NPM Version (
npm -v
): 4.2.0 - OS: MacOS Sierra
Description:
After updating laravel-mix to 0.8.3 I suddenly get an error on “npm run dev”.
Steps To Reproduce:
- I ran “npm update”
- Only laravel-mix updated itself from 0.8.1 to 0.8.3
- Type “npm run dev”
- Error!
- Set laravel-mix version to 0.8.2 + npm update + npm run dev
- Still error!
- Set laravel-mix version to 0.8.1 + npm update + npm run dev
- Phew it works again.
CMD output:
@ dev /Users/thom/Sites/vacatures node node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
module.js:472 throw err; ^
Error: Cannot find module ‘/Users/thom/Sites/vacatures/node_modules/cross-env/bin/cross-env.js’ at Function.Module._resolveFilename (module.js:470:15) at Function.Module._load (module.js:418:25) at Module.runMain (module.js:605:10) at run (bootstrap_node.js:422:7) at startup (bootstrap_node.js:143:9) at bootstrap_node.js:537:3
npm ERR! Darwin 16.4.0
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “run” “dev”
npm ERR! node v7.6.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ dev: node node_modules/cross-env/bin/cross-env.js 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 ‘node node_modules/cross-env/bin/cross-env.js 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! node node_modules/cross-env/bin/cross-env.js 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! /Users/thom/.npm/_logs/2017-02-22T22_06_58_870Z-debug.log 2017-02-22T22_06_58_870Z-debug.log.txt
Issue Analytics
- State:
- Created 7 years ago
- Reactions:9
- Comments:38 (6 by maintainers)
Top GitHub Comments
For me the quick solution was this
Okay, updating the package.json to the new version in Laravel’s master branch does indeed fix the problem I have.
Running npm run dev works now, but it does produce a deprecation warning, just so you know: “DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56 parseQuery() will be replaced with getOptions() in the next major version of loader-utils.”
Not sure if I should close this issue, because probably many others who type “npm update” will get this problem?