我最近通过React前端复制到了Phoenix后端的assets
文件夹中,并且还添加了Webpack。
运行npm start
时,即使删除节点模块文件夹和package-lock.json
文件并运行npm install
,也会收到此错误,而运行{{1} }。
npm start
该错误听起来很简单,除了我做了一个The react-scripts package provided by Create React App requires a dependency:
"webpack": "4.19.1"
Don't try to install it manually: your package manager does it automatically.
However, a different version of webpack was detected higher up in the tree:
/Users/danale/Projects/node_modules/webpack (version: 4.29.0)
并且我使用的是该错误表明我应该使用的版本:
npm ls webpack
请指向我应该看的方向。
这是我的└─┬ react-scripts@2.0.5
└── webpack@4.19.1
文件:
package.json