解决 npm install Error: EACCES: permission denied, mkdir node_modules/gifsicle/
1. 原因CentOS jenkins自动构建服务 使用root账号执行npn install 指令,报错如下> gifsicle@4.0.1 postinstall /***//node_modules/gifsicle> node lib/install.js⚠ EACCES: permission denied, open '/***//node_modules/...
·
1. 原因CentOS jenkins自动构建服务 使用root账号执行npn install 指令,报错如下
> gifsicle@4.0.1 postinstall /***//node_modules/gifsicle
> node lib/install.js
⚠ EACCES: permission denied, open '/***//node_modules/gifsicle/vendor/gifsicle'
⚠ gifsicle pre-build test failed
ℹ compiling from source
✖ Error: EACCES: permission denied, mkdir '/***//node_modules/gifsicle/9341d536-a2fb-4d27-b4de-c1cf6ba79f6b'
> optipng-bin@6.0.0 postinstall /***//node_modules/optipng-bin
> node lib/install.js
⚠ EACCES: permission denied, open '/***//node_modules/optipng-bin/vendor/optipng'
⚠ optipng pre-build test failed
ℹ compiling from source
✖ Error: EACCES: permission denied, mkdir '/***//node_modules/optipng-bin/5ca0582d-e98e-415f-9043-9b1927de9804'
> pngquant-bin@5.0.2 postinstall /***//node_modules/pngquant-bin
> node lib/install.js
⚠ EACCES: permission denied, open '/***//node_modules/pngquant-bin/vendor/pngquant'
⚠ pngquant pre-build test failed
ℹ compiling from source
✖ Error: pngquant failed to build, make sure that libpng-dev is installed
2. 调整构建指令
npm install --unsafe-perm=true --allow-root
错误解决。
更多推荐
已为社区贡献10条内容
所有评论(0)