0

While I am trying to import oracledb@3.0.0 using Node 10.9.0, I am getting below error,

oracledb Beginning installation
oracledb Verifying installation
oracledb Continuing installation
oracledb ERR! NJS-054: Binary build/Release/oracledb.node was not installed.
oracledb ERR! Failed to install binary package oracledb-v3.0.0-node-abi64-linux-x64.gz
oracledb ERR! EACCES: permission denied, mkdir 'build'
oracledb ERR! For help see https://oracle.github.io/node-oracledb/INSTALL.html#troubleshooting

Since above code seems to be permission issue, I also tried sudo npm i mypck@3.2.0 but then it gives below error

sudo: npm: command not found

Question:

How can I give permission to create directory or execute command npm with sudo rights, any help would be deeply appreciated.

4

1 回答 1

3

Utilize --unsafe-perm=true and --allow-root flags with npm install.

npm install -g oracledb@3.0.0 --unsafe-perm=true --allow-root

You can read more o this here : https://docs.npmjs.com/getting-started/fixing-npm-permissions

于 2018-10-24T06:48:20.993 回答