I'm with Centos7, installed on VirtualBox (true OS: Windows 7).
- Node version: 6.10.3
- Npm version: 3.10.10
I installed vue-cli, like this:
sudo npm install -g vue-cli
Then I created a new vue project, like this:
sudo vue init webpack-simple mynewproject
But I get an error when running "npm run dev":
> [email protected] dev /var/www/html/mynewproject
> cross-env NODE_ENV=development webpack-dev-server --open --hot
sh: cross-env : commande introuvable
npm ERR! Linux 3.10.0-514.el7.x86_64
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "run" "dev"
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! [email protected] dev: `cross-env NODE_ENV=development webpack-dev-server --open --hot`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] dev script 'cross-env NODE_ENV=development webpack-dev-server --open --hot'.
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 vuetest 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 webpack-dev-server --open --hot
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs vuetest
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls vuetest
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /var/www/html/mynewproject/npm-debug.log
Does anyone know how to fix it?
npm install -g webpack-dev-server
then cd into your project folder and runwebpack-dev-server --inline --hot
– Vamsi Krishna