I've been using laravel with the online c9 ide for awhile now which you are most likely familiar with. All of the webpack commands will not work for some reason and this is a huge issue due to the fact this is the life line for compiling our scripts. I鈥檓 no webpack expert but hopefully this will get fixed soon. Cheers!
this is the error I get when running "npm run dev":
_$ npm run dev
@ dev /home/ubuntu/workspace
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
/home/ubuntu/workspace/node_modules/laravel-mix/setup/webpack.config.js:120
let extractPlugin = new plugins.ExtractTextPlugin(
^^^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at requireConfig (/home/ubuntu/workspace/node_modules/webpack/bin/convert-argv.js:96:18)
at /home/ubuntu/workspace/node_modules/webpack/bin/convert-argv.js:109:17
at Array.forEach (native)
npm ERR! Linux 4.8.2-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/node" "/home/ubuntu/.nvm/versions/node/v4.6.1/bin/npm" "run" "dev"
npm ERR! node v4.6.1
npm ERR! npm v4.1.2
npm ERR! code ELIFECYCLE
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! /home/ubuntu/workspace/npm-debug.log_
Update node
I had the same problem, and updating node from 4.1.x to 7.5.0 fixed it for me. (I'm now hitting a different error, but hey, that's a fix.)
Most helpful comment
Update node