-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用egg-init创建simple项目后,执行npm install时安装egg-ci报错。 #2442
Comments
Translation of this issue: After creating a simple project with egg-init, install egg-ci when npm install is executed.
|
where is error message? |
Hello @sadcity. Please provide a reproducible example by creating a github repo. Issues labeled by |
@atian25 @popomore
虽然没什么影响,只是ci跑不通,但是安装模块就报这个错,提示出来也不合适,可以给些说明或者规避的提醒。 |
Error: EACCES: permission denied |
@atian25 并不是权限的问题,是文件根本不存在。 |
这是 egg-ci 的 postinstall 里面会复制文件到你的项目目录下,写入的目标地址是 '/starlab/www/test/node/egg-example/.travis.yml' ,没有权限,写入失败,自然你 ls 不到 |
@atian25 我是用root运行的,为什么还会权限不足呢~ |
不确定,这属于系统问题。 |
遇到了同样的问题,用户是 root,运行于 ubuntu server 上,出错时 .travis.yml 文件也不存在
报错内容:
|
尝试单独 npm 安装
也会有同样的报错 测试1:如果单独写个 js const fs = require('fs');
fs.writeFileSync('/data/projectname/.travis.yml', 'test'); 又能正常创建文件 测试2
也会出错 测试4先 touch .travis.yml,赋予 777 权限,就能接下去运行了。 |
这是 npm 的机制吧,看看 npm 文档 https://docs.npmjs.com/misc/scripts#user
|
I hope this could be fixed by all means. |
+1, 在centos上运行这个命令就报错了
|
权限问题 |
因为服务器就是我的,只有一个root用户。系统CentOS chmod 777 项目目录/ |
用这个命令 npm install --unsafe-perm |
用这个命令 npm install --unsafe-perm 解决了 |
|
The text was updated successfully, but these errors were encountered: