相关疑难解决方法(0)

错误:EACCES:权限被拒绝,访问'/ usr/local/lib/node_modules'做出反应

可能导致错误的原因是Error: EACCES: permission denied, access '/usr/local/lib/node_modules'什么?

npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be …
Run Code Online (Sandbox Code Playgroud)

install node.js npm reactjs

183
推荐指数
23
解决办法
15万
查看次数

Docker - EACCES:权限被拒绝,mkdir '/app/node_modules/.cache'

我今天刚开始使用 docker,但因权限问题而被阻止。我不知道应该输入什么来切换权限。我假设这是一个 chown 的事情。还有其他关于堆栈溢出的问题,但它们对我没有帮助,因为它们要么不是 Docker 特定的,要么没有对该问题的选定答案。

\n

下面是错误

\n
client_1  | \nclient_1  | > client@0.1.0 start\nclient_1  | > react-scripts start\nclient_1  | \nclient_1  | \xe2\x84\xb9 \xef\xbd\xa2wds\xef\xbd\xa3: Project is running at http://172.19.0.2/\nclient_1  | \xe2\x84\xb9 \xef\xbd\xa2wds\xef\xbd\xa3: webpack output is served from \nclient_1  | \xe2\x84\xb9 \xef\xbd\xa2wds\xef\xbd\xa3: Content not from webpack is served from /app/public\nclient_1  | \xe2\x84\xb9 \xef\xbd\xa2wds\xef\xbd\xa3: 404s will fallback to /\nclient_1  | Starting the development server...\nclient_1  | \nclient_1  | Failed to compile.\nclient_1  | \nclient_1  | EACCES: permission denied, mkdir '/app/node_modules/.cache'\n
Run Code Online (Sandbox Code Playgroud)\n

我的 docker-compose.yml …

linux permissions docker

12
推荐指数
1
解决办法
3万
查看次数

标签 统计

docker ×1

install ×1

linux ×1

node.js ×1

npm ×1

permissions ×1

reactjs ×1