Alzaabi98's avatar

npm run dev errors

Hi All,

I am running Laravel in cloud 9 and I got this error when I run "npm run dev"

cross-env 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:1 (function (exports, require, module, __filename, __dirname) { let path = require('path'); ^^^

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! code ELIFECYCLE npm ERR! errno 1 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! A complete log of this run can be found in: npm ERR! /home/ubuntu/.npm/_logs/2017-05-11T06_35_15_767Z-debug.log

0 likes
3 replies
Alzaabi98's avatar

thanks theUnforgiven

what is the reason for that? I am using hosted server .. also I got the same error in myMac . i will try same command again at home,

thanks again

Alzaabi98's avatar

I am getting this error in my Mac using Homestead

this command does work .. sudo npm dev run

sh: cross-env: command not found npm ERR! file sh npm ERR! code ELIFECYCLE npm ERR! errno ENOENT npm ERR! syscall spawn npm ERR! @ development: 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! spawn ENOENT 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! /Users/abdulaziz/.npm/_logs/2017-05-11T15_58_59_450Z-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! /Users/abdulaziz/.npm/_logs/2017-05-11T15_58_59_473Z-debug.log

Please or to participate in this conversation.