aws lambda 安装 SAM Local 遇到错误:EACCES: permission denied, mkdir

简介: 版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/79729884 ...
版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/79729884

aws lambda 安装 SAM Local 遇到错误:

> aws-sam-local@0.2.8 postinstall /usr/local/lib/node_modules/aws-sam-local
> go-npm install

/usr/local/lib/node_modules/aws-sam-local/node_modules/mkdirp/index.js:90
                    throw err0;
                    ^

Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/aws-sam-local/bin'
    at Object.fs.mkdirSync (fs.js:885:18)
    at Function.sync (/usr/local/lib/node_modules/aws-sam-local/node_modules/mkdirp/index.js:71:13)
    at Object.install (/usr/local/lib/node_modules/aws-sam-local/node_modules/go-npm/bin/index.js:161:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/aws-sam-local/node_modules/go-npm/bin/index.js:212:17)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! aws-sam-local@0.2.8 postinstall: `go-npm install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the aws-sam-local@0.2.8 postinstall 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!     /Users/xxx/.npm/_logs/2018-03-28T08_17_57_066Z-debug.log

解决方法:

添加参数:--unsafe-perm

完整命令:

sudo npm install -g aws-sam-local --unsafe-perm


--unsafe-perm 参数说明:

  • unsafe-perm: 如果设置为true,则禁止UID/GID互相切换,当运行package scripts

目录
相关文章
|
Android开发
【错误记录】Android 可执行权限报错 ( Cannot run program “/data/user/0/cn.e/ffmpeg“: error=13,Permission denied )
【错误记录】Android 可执行权限报错 ( Cannot run program “/data/user/0/cn.e/ffmpeg“: error=13,Permission denied )
1924 0
【错误记录】Android 可执行权限报错 ( Cannot run program “/data/user/0/cn.e/ffmpeg“: error=13,Permission denied )
|
分布式计算 Hadoop Linux
Linux报错:mkdir:无法创建目录“/opt/apps/xxx/logs“: Permission denied
Linux报错:mkdir:无法创建目录“/opt/apps/xxx/logs“: Permission denied
499 0
|
分布式计算 资源调度 Hadoop
Hadoop常见错误及解决方案、Permission denied: user=dr.who, access=WRITE, inode=“/“:summer:supergroup:drwxr-xr-x
Hadoop常见错误及解决方案、Permission denied: user=dr.who, access=WRITE, inode=“/“:summer:supergroup:drwxr-xr-x
Hadoop常见错误及解决方案、Permission denied: user=dr.who, access=WRITE, inode=“/“:summer:supergroup:drwxr-xr-x
|
应用服务中间件 nginx
【报错集锦】mkdir(): Permission denied
【报错集锦】mkdir(): Permission denied
1157 0
【报错集锦】mkdir(): Permission denied
|
Linux
linux 下 root 权限执行 npm install 报错:Error:EACCES:permission denied ‘xxx‘?
linux 下 root 权限执行 npm install 报错:Error:EACCES:permission denied ‘xxx‘?
319 0
linux 下 root 权限执行 npm install 报错:Error:EACCES:permission denied ‘xxx‘?
|
Linux API PHP
php遇到failed to open stream: Permission denied
php遇到failed to open stream: Permission denied
746 0
|
安全 大数据
frequency file /var/lib/ntp/drift/ntp.drift.TEMP: Permission denied 的解决方案
frequency file /var/lib/ntp/drift/ntp.drift.TEMP: Permission denied 的解决方案
422 0
|
Ubuntu Linux
Ubuntu cannot open directory ‘.‘: Permission denied错误
Ubuntu cannot open directory ‘.‘: Permission denied错误
1013 0
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
519 0
Geany 权限问题:"Error opening file ... : permission denied.",原因及解决办法。
wamp You don't have permission to access / on this server等问题的解决.
原文: wamp You don't have permission to access / on this server等问题的解决. 安装完wamp之后,安装网上的教程设置虚拟路径,出现了问题,同样的问题由不同的原因导致。
1140 0