I am trying to start using npm and vue for my front end development but having such a hard time starting. I am using scotchbox pro which is just a Vagrant box for development. I am running this VM on windows 10 and have a fresh install of laravel 5.4.
The default package.json is there (https://github.com/laravel/laravel/blob/master/package.json) and I have been trying to run npm install on the with no success for the last few days.
I am not sure where I should be looking for support on this issue since it could be laravel, npm, or my VM. It is so difficult for me to find a solid resource on how to get up and running!
Here is the npm run dev output that I get:
@ dev /var/www npm run development @ development /var/www cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress -hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js sh: 1: cross-env: not found npm ERR! Linux 4.4.0-75-generic npm ERR! argv "/home/vagrant/.nvm/versions/node/v6.10.3/bin/node" "/home/vagrant/.nvm/versions/node/v6.10.3/bin/npm" "run" "development" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 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 '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! /var/www/npm-debug.log npm ERR! Linux 4.4.0-75-generic npm ERR! argv "/home/vagrant/.nvm/versions/node/v6.10.3/bin/node" "/home/vagrant/.nvm/versions/node/v6.10.3/bin/npm" "run" "dev" npm ERR! node v6.10.3 npm ERR! npm v3.10.10 npm ERR! code ELIFECYCLE npm ERR! @ dev: `npm run development` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ dev script 'npm run development'. 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! npm run development 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! /var/www/npm-debug.log
npm install
and it fixed the issue. – Joenpm install --no-bin-links
, if you have errors in the first run just retry the same command. – dparolisudo npm install -g npm
and then remove the node_modules directory and the package-lock.json . then donpm install --no-bin-links
and let me know if u get a different error this time. – Sari Yono