更新时间:2023-08-01 GMT+08:00
gyp ERR! stack Error: EACCES: permission denied
问题现象
执行Npm构建任务时,日志报如下异常信息:
gyp ERR! stack Error: EACCES: permission denied, mkdir '******/job_1451ba57-0c35-4daa-99c2-21425404f61c_1564043318112/saas_shop/node_modules/node-sass/.node-gyp'
原因分析
当前目录没有读写权限。
处理办法
编辑任务,在命令行npm install命令之后添加node-sass --unsafe-perm=true,保存任务重新执行。
父主题: Npm构建
Npm构建 所有常见问题
- JavaScript heap out of memory
- Unexpected end of JSON ...
- enoent ENOENT: no such file or directory
- Module not found: Error: Can't resolve ...
- NPM构建失败,但不显示错误日志
- npm cb() never called
- gyp ERR! stack Error: EACCES: permission denied
- eslint: error 'CLODOP' is not defined
- node-sass下载失败
- error: could not write config file
- npm构建耗时且安装依赖缓慢
- 找不到依赖版本
more