【解决方案】vue 项目 npm run dev 时报错:‘cross-env‘ 不是内部或外部命令,也不是可运行的程序

报错


'cross-env' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! estate@1.0.0 dev: `cross-env webpack-dev-server --inline --progress --config build/webpack.dev.conf.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the estate@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jw_33\AppData\Roaming\npm-cache\_logs\2023-11-08T05_33_09_990Z-debug.log

在这里插入图片描述

解决方案

安装依赖

npm install --save-dev cross-env

猜你喜欢

转载自blog.csdn.net/gjwgjw1111/article/details/134287702