执行npm start
时,收到此消息后不久,我遇到了编译错误。
Module not found: Can't resolve '.../services/api' in '/mnt/c/Users/chung/dev/flatiron/labs/mod-5/herschmersch/frontend-herschmersch/src/containers'
/mnt/c/Users/chung/dev/flatiron/labs/mod-5/herschmersch/frontend-herschmersch/node_modules/react-scripts/scripts/start.js:19
throw err;
^
[Error: EACCES: permission denied, stat '/mnt/c/Documents and Settings'] {
errno: -13,
code: 'EACCES',
syscall: 'stat',
path: '/mnt/c/Documents and Settings'
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! frontend-herschmersch@0.1.0 start: `PORT=3001 react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the frontend-herschmersch@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/nathan/.npm/_logs/2020-10-09T04_07_10_726Z-debug.log
当我删除React代码中最初导致错误的原因时,它似乎可以工作。尝试安装Plotly时,我也遇到了类似的问题。
任何建议都会很棒!
谢谢
我还注意到这在我的node_modules文件夹中进行:
// ♥ ls -la /usr/local/lib/node_modules
total 0
drwxr-xr-x 1 nathan nathan 512 Oct 8 23:37 .
drwxr-xr-x 1 root root 512 Oct 7 12:04 ..
我试图更改所有者,但是还有一行显示root。