错误提示:'cross-env' 不是内部或外部命令,也不是可运行的程序

错误提示

主要的错误提示如下:

> @ development E:\code\enginepower\laravel
> cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js "--watch" "--watch-poll"

'cross-env' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
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 "--watch" "--watch-poll"`
npm ERR! Exit status 1
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! C:\Users\NING MEI\AppData\Roaming\npm-cache\_logs\2019-11-11T08_47_29_096Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch: `npm run development -- --watch "--watch-poll"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch 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! C:\Users\NING MEI\AppData\Roaming\npm-cache\_logs\2019-11-11T08_47_29_140Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ watch-poll: `npm run watch -- --watch-poll`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ watch-poll 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! C:\Users\NING MEI\AppData\Roaming\npm-cache\_logs\2019-11-11T08_47_29_188Z-debug.log

安装npm时候的报错:

错误提示:'cross-env' 不是内部或外部命令,也不是可运行的程序_第1张图片

解决方法

npm install -save-dev cross-env@

错误提示:'cross-env' 不是内部或外部命令,也不是可运行的程序_第2张图片

 

输入命令:npm install -save-dev cross-env@^5.1(这是报错前的cross-env版本)

你可能感兴趣的:(错误提示:'cross-env' 不是内部或外部命令,也不是可运行的程序)