NPM / Nodejs:无法安装scrypt@6.0.3
实际上,我正在尝试安装express-basic-auth
,但是由于安装了[email protected]
,因此失败。我已经尝试过:
sudo apt-get install build-essential
并且还尝试删除~/.node-gyp
,如下所示:,但是所有建议都没有帮助。我仍然收到相同的错误:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/a/b/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/a/b/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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! /home/user/.npm/_logs/2018-12-30T20_52_24_060Z-debug.log
有人可以帮忙吗?
回答如下:我通过在本地安装节点的早期版本(在本例中为节点8.10.0版本)解决了此问题。我不再遇到您遇到的相同错误。删除您的节点模块和package-lock.json然后运行
npm install --save node@earlierversion
npm install rest of packages
这就是我重建节点模块并防止出现此错误的方法。
NPM / Nodejs:无法安装scrypt@6.0.3
实际上,我正在尝试安装express-basic-auth
,但是由于安装了[email protected]
,因此失败。我已经尝试过:
sudo apt-get install build-essential
并且还尝试删除~/.node-gyp
,如下所示:,但是所有建议都没有帮助。我仍然收到相同的错误:
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/user/code/a/b/node_modules/scrypt/build'
gyp ERR! System Linux 4.20.0-042000-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/user/code/a/b/node_modules/scrypt
gyp ERR! node -v v9.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN [email protected] No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install 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! /home/user/.npm/_logs/2018-12-30T20_52_24_060Z-debug.log
有人可以帮忙吗?
回答如下:我通过在本地安装节点的早期版本(在本例中为节点8.10.0版本)解决了此问题。我不再遇到您遇到的相同错误。删除您的节点模块和package-lock.json然后运行
npm install --save node@earlierversion
npm install rest of packages
这就是我重建节点模块并防止出现此错误的方法。