npm - NPM 错误。Eacess:权限被拒绝,统计
问题描述
执行时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
当我在我的反应代码中删除最初导致错误的原因时,它似乎有效。我在尝试安装时也遇到了类似的问题。
任何建议都会很棒!
谢谢
编辑
我还注意到这发生在我的 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。
解决方案
推荐阅读
- c# - 如何在创建工具的同时创建工具事件?(C#,Windows 窗体)
- sql - 如何按特定列限制?
- javascript - 从页面上的表单输出数据反应
- css - `html` 和 `html, body` 选择器在渲染结果方面有什么区别吗
- laravel - 删除功能不适用于控制器
- c# - 将 MagickImage 转换为位图
- flutter - 颤动中浮动操作按钮上的通知徽章
- javascript - 如何使用javascript根据数组项过滤对象?
- google-tag-manager - 谁知道 Facebook 标准转换的 GTM 脚本:预约预约和电话号码点击?
- r - 使用 facet_wrap_paginate 循环无序交替生成的图