提示“webpack-dev-serve”不是内部或外部命令,也不是可运行的程序或批处理文件。
不知为何提示“webpack-dev-serve”不是内部或外部命令,也不是可运行的程序或批处理文件。 谁帮帮我?
yarn run v1.22.10
$ cross-env NODE_ENV=development webpack-dev-serve --config webpack.config.js
'webpack-dev-serve' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn webpack-dev-serve ENOENT
at notFoundError (E:\Item\20040-todo\20040-todo-root\todo-root\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (E:\Item\20040-todo\20040-todo-root\todo-root\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (E:\Item\20040-todo\20040-todo-root\todo-root\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess.cp.emit (E:\Item\20040-todo\20040-todo-root\todo-root\node_modules\cross-env\node_modules\cross-spawn\lib\enoent.js:30:37)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn webpack-dev-serve',
path: 'webpack-dev-serve',
spawnargs: [ '--config', 'webpack.config.js' ]
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.