node.js - 运行 npm install -g composer-cli 时出现 eacces 错误
问题描述
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /home/akash2/.npm-packages/lib/node_modules/.staging/grpc-b403b8a1/node_modules/mkdirp
npm ERR! dest /home/akash2/.npm-packages/lib/node_modules/.staging/mkdirp-13f83417
npm ERR! errno -13
npm ERR!
npm ERR! Your cache folder contains root-owned files, due to a bug in
npm ERR! previous versions of npm which has since been addressed.
npm ERR!
npm ERR! To permanently fix this problem, please run:
npm ERR! sudo chown -R 1000:1000 "/home/akash2/.npm"
npm ERR! A complete log of this run can be found in:
npm ERR! /home/akash2/.npm/_logs/2021-05-07T05_37_52_411Z-debug.log
这些是错误。我正在尝试解决此问题,但不能。
解决方案
推荐阅读
- azure - 如何将来自 Azure 函数应用的检测关联到 Azure 逻辑应用
- flutter - NoSuchMethodError:在 null 颤动上调用了 getter 'uid'
- node.js - { n: 1, nModified: 0, ok: 1 } 在 mongodb 中更新数组太快时
- python - 连接字符串以在 Python 中生成路径位置时出现 EOL 错误
- android - 如何在 Android 中自定义警报对话框?
- css - 盖茨比背景图像上的线性梯度
- elasticsearch - 密码的未知设置“iv”
- python - 如何使用 lambda 函数将文件从 s3 存储桶复制到 ec2 实例?
- python - 带有文件路径的python argparse自动完成
- javascript - nodemon ,应用程序崩溃,在启动前等待文件更改