可能导致错误的原因是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) 我今天刚开始使用 docker,但因权限问题而被阻止。我不知道应该输入什么来切换权限。我假设这是一个 chown 的事情。还有其他关于堆栈溢出的问题,但它们对我没有帮助,因为它们要么不是 Docker 特定的,要么没有对该问题的选定答案。
\n下面是错误
\nclient_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'\nRun Code Online (Sandbox Code Playgroud)\n我的 docker-compose.yml …