【发布时间】:2018-11-08 11:15:03
【问题描述】:
我刚刚用 react 启动了一个 jhipster 项目,我从 webpack 开发服务器收到了这个错误: Andrews-MBP:familyhomestay andrewcarre$纱开始 纱线运行 v1.3.2
$ yarn start
yarn run v1.3.2
$ yarn run webpack:dev
$ yarn run webpack-dev-server -- --config webpack/webpack.dev.js --progress --inline --profile --port=9060
warning From Yarn 1.0 onwards, scripts don't require "--" for options to be forwarded. In a future version, any explicit "--" will be forwarded as-is to the scripts.
$ node --max_old_space_size=4096 node_modules/webpack-dev-server/bin/webpack-dev-server.js --config webpack/webpack.dev.js --progress --inline --profile --port=9060
module.js:557
throw err;
^
Error: Cannot find module '/Users/andrewcarre/Desktop/familyhomestay/node_modules/webpack-dev-server/bin/webpack-dev-server.js'
at Function.Module._resolveFilename (module.js:555:15)
at Function.Module._load (module.js:482:25)
at Function.Module.runMain (module.js:701:10)
at startup (bootstrap_node.js:193:16)
at bootstrap_node.js:617:3
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Andrews-MBP:familyhomestay andrewcarre$
我没有更改 webpack 配置中的任何内容。有什么想法吗?
【问题讨论】: