RBAINDOU-M-4116:mqtt-data-generator robert$ sudo npm install bcrypt
> [email protected] install /Users/robert/projects/mqtt-data-generator/node_modules/bufferutil
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/robert/projects/mqtt-data-generator/node_modules/bufferutil/build'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/robert/projects/mqtt-data-generator/node_modules/bufferutil
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
> [email protected] install /Users/robert/projects/mqtt-data-generator/node_modules/utf-8-validate
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/robert/projects/mqtt-data-generator/node_modules/utf-8-validate/build'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/robert/projects/mqtt-data-generator/node_modules/utf-8-validate
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
> [email protected] install /Users/robert/projects/mqtt-data-generator/node_modules/bcrypt
> node-pre-gyp install --fallback-to-build
node-pre-gyp ERR! Pre-built binaries not installable for [email protected] and [email protected] (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error EACCES: permission denied, mkdir '/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/build'
gyp ERR! System Darwin 15.6.0
gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/robert/projects/mqtt-data-generator/node_modules/bcrypt
gyp ERR! node -v v10.4.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/5.7.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:961:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
node-pre-gyp ERR! System Darwin 15.6.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/5.7.0/bin/node" "/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/robert/projects/mqtt-data-generator/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.4.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/5.7.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Users/robert/projects/mqtt-data-generator/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi' (1)
npm WARN [email protected] No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/bufferutil):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/utf-8-validate):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-pre-gyp install --fallback-to-build`
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! /Users/robert/.npm/_logs/2018-06-08T20_49_43_721Z-debug.log
RBAINDOU-M-4116:mqtt-data-generator robert$
Chown your node_modules and _do not run as sudo_.
NPM will refuse installing native modules with sudo.
Hi agathver: I am running into the same problem. I tried running "npm install"(without sudo) and I still got the same error. How would I use chown properly?
BBTEST:TestingTemplater David$ npm install
[email protected] preinstall /Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater
npm set audit false
npm WARN checkPermissions Missing write access to /Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules
npm ERR! path /Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path:
npm ERR! '/Users/user/Documents/Bottega/JavaScript/JavaScriptws/TestingTemplater/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2018-12-31T21_19_06_252Z-debug.log
BBTEST:TestingTemplater David$
NPM runs install scripts as user "nobody" if it's started by root. I think you will need to chown the node_modules directory to your user.
_--allow-root_ flag helps me
thanks
On Thu, May 23, 2019 at 1:28 PM gkniazkov notifications@github.com wrote:
--allow-root flag helps me
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/kelektiv/node.bcrypt.js/issues/618?email_source=notifications&email_token=AH42JUNGPOKYI4O6EUALCQ3PW3V4LA5CNFSM4FEDXR3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWDH2NI#issuecomment-495353141,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AH42JUPZKZ4DDHYKEI3GLVLPW3V4LANCNFSM4FEDXR3A
.
--
David Bean
435-896-3170
_--allow-root_ flag helps me
work for me ! thanks !
I also had this error but after running this command :
sudo chown -R $(whoami) ~/.npm
everything seems working fine and I think it's a more stable solution.
Most helpful comment
Chown your node_modules and _do not run as sudo_.
NPM will refuse installing native modules with sudo.