Sudo npm install -g vapid-cli NOT WORKING


#1

not is insalled v10.10.0

root@vapid:~# sudo npm install -g vapid-cli
npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
npm WARN deprecated @types/commander@2.12.2: This is a stub types definition for commander (https://github.com/tj/commander.js). commander provides its own type definitions, so you don’t need @types/commander installed!
/usr/local/bin/vapid -> /usr/local/lib/node_modules/vapid-cli/bin/cli.js

bcrypt@2.0.1 install /usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt
node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! Pre-built binaries not installable for bcrypt@2.0.1 and node@10.10.0 (node-v64 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib’
gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/10.10.0”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/.node-gyp”
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir ‘/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/.node-gyp’
gyp ERR! System Linux 4.15.0-36-generic
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “configure” “–fallback-to-build” “–module=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding/bcrypt_lib.node” “–module_name=bcrypt_lib” “–module_path=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding” “–napi_version=3” “–node_abi_napi=napi”
gyp ERR! cwd /usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt
gyp ERR! node -v v10.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi’ (1)
node-pre-gyp ERR! stack at ChildProcess. (/usr/local/lib/node_modules/vapid-cli/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:962:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
node-pre-gyp ERR! System Linux 4.15.0-36-generic
node-pre-gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt
node-pre-gyp ERR! node -v v10.10.0
node-pre-gyp ERR! node-pre-gyp -v v0.9.1
node-pre-gyp ERR! not ok
Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/usr/local/lib/node_modules/vapid-cli/node_modules/bcrypt/lib/binding --napi_version=3 --node_abi_napi=napi’ (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/vapid-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@2.0.1 install: node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@2.0.1 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! /root/.npm/_logs/2018-10-08T20_02_35_220Z-debug.log


Install not working
#2

@dthreatt: It’s weird that root is having permission troubles:

Are you installing on Ubuntu? If so, I wonder if this might help: https://windowswebdev.io/getting-vapid-up-and-running-on-wsl-ubuntu


Install not working
#3

ok will try. what is best platform on digital ocean?


#4

That worked…thanks