我正在尝试为我的从源代码控制下载的React项目安装节点依赖项,但是遇到了一些麻烦。例如,我遇到了以下错误:
Failed to compile
./node_modules/chain-function/index.js
Error: ENOENT: no such file or directory, open 'C:\....\v7\ClientApp\node_modules\chain-function\index.js'
我的package.json文件中没有列出作为依赖项的“链功能”,而且我不确定如何找出导致此错误的原因以及如何解决该问题。
这是我的package.json依赖项:
"bootstrap": "^3.3.7",
"jquery": "^3.3.1",
"popper.js": "^1.14.4",
"react": "^16.5.2",
"react-bootstrap": "^0.31.5",
"react-cookie": "^3.0.4",
"react-dom": "^16.0.0",
"react-redux": "^5.0.7",
"react-router-bootstrap": "^0.24.4",
"react-router-dom": "^4.2.2",
"react-scripts": "^2.0.4",
"react-text-mask": "^5.4.3",
"react-tooltip": "^3.9.0",
"react-transition-group": "^2.5.0",
"redux": "^4.0.0",
"rimraf": "^2.6.2"
答案 0 :(得分:2)
package.json中的某些依赖关系可能依赖于链功能,或者仅仅是网络问题。面对这样的问题很正常,我只能给您一些建议。