Node won't install Ionic without errors on macOS High Sierra - macos

The installation won't complete without errors, and as a result, Ionic does not function correctly. I've tried removing and reinstalling several times with no success, and none of the tips I found have solved the problem.
I would be greatful for input.
sudo npm install -g ionic
Password:
/usr/local/bin/ionic -> /usr/local/lib/node_modules/ionic/bin/ionic
> fsevents#1.1.3 install /usr/local/lib/node_modules/ionic/node_modules/fsevents
> node install
node-pre-gyp ERR! Tried to download(undefined): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v51-darwin-x64.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for fsevents#1.1.3 and node#7.0.0 (node-v51 ABI, unknown) (falling back to source compile with node-gyp)
gyp ERR! clean error
gyp ERR! stack Error: EACCES: permission denied, rmdir 'build'
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/usr/local/Cellar/node/7.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "clean"
gyp ERR! cwd /usr/local/lib/node_modules/ionic/node_modules/fsevents
gyp ERR! node -v v7.0.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/7.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/ionic/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:106:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:877:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Darwin 17.4.0
node-pre-gyp ERR! command "/usr/local/Cellar/node/7.0.0/bin/node" "/usr/local/lib/node_modules/ionic/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/ionic/node_modules/fsevents
node-pre-gyp ERR! node -v v7.0.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.39
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node/7.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js clean' (1)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules/ionic/node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 install: `node install`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
+ ionic#3.20.0
updated 1 package in 11.239s

I was able to fix this by reinstalling nodejs. Not quite sure what caused the problem in the first place.

Related

Issue with node-pre-gyp while installing argon2 on Mac

I'm trying to install argon2 with yarn add argon2 and get this following error.
What I have done:
Installed v8.4.1 of node-gyp
Installed mapbox/node-pre-gyp v1.0.9
Manually added node-pre-gyp v "0.17.0" into devDeps
However the issue still persists.
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory:
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp#1.0.9
node-pre-gyp info using node#16.14.2 | darwin | arm64
node-pre-gyp info check checked for "" (not found)
node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-napi-v3-darwin-arm64-unknown.tar.gz
node-pre-gyp ERR! install response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-napi-v3-darwin-arm64-unknown.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for argon2#0.28.5 and node#16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/ranisalt/node-argon2/releases/download/v0.28.5/argon2-v0.28.5-napi-v3-darwin-arm64-unknown.tar.gz
gyp info it worked if it ends with ok
gyp info using node-gyp#8.4.1
gyp info using node#16.14.2 | darwin | arm64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp#8.4.1
gyp info using node#16.14.2 | darwin | arm64
gyp info find Python using Python version 3.9.10 found at "/opt/homebrew/opt/python#3.9/bin/python3.9"
gyp info spawn /opt/homebrew/opt/python#3.9/bin/python3.9
make: *** [Release/obj.target/argon2/src/argon2_node.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (node:events:526:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Darwin 20.3.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/" "--module_name=argon2" "--module_path=" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
gyp ERR! cwd
gyp ERR! node -v v16.14.2
gyp ERR! node-gyp -v v8.4.1
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 build --fallback-to-build --module= --module_name=argon2 --module_path= --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous>
node-pre-gyp ERR! stack at ChildProcess.emit (node:events:526:28)
node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
node-pre-gyp ERR! System Darwin 20.3.0
node-pre-gyp ERR! command "/usr/local/bin/node" "" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd
node-pre-gyp ERR! node -v v16.14.2
node-pre-gyp ERR! node-pre-gyp -v v1.0.9
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 build --fallback-to-build --module=```
This is resolved by downgrade my node version from 16x to 14.
I use n for node version management https://github.com/tj/n/tree/5b4a526ec71a8b9c4e9af909487565b35e803fe8

I can't install VCRemote on MacOS 10.13.6

I'm trying to install VCRemote on MacOS but when I try
npm install -g --unsafe-perm vcremote
I get the following errors
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 17.7.0
gypgyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node" "--module_name=node_ios_device" "--module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node" "--module_name=node_ios_device" "--module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v10.15.1
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 build --fallback-to-build --module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node --module_name=node_ios_device --module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
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 build --fallback-to-build --module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node --module_name=node_ios_device --module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-ios-device#1.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-ios-device#1.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Am I missing something? I'm fairly new to NPM, I'm following this guide from Microsoft guide here to set up vcremote
I can attach the full error log if needed as well.
Any guidance or help is greatly appreciated.

NativeScript tns create fails - At POSTINSTALL Script

I try to create a new project with the following command, the folders first get created and by the end gets deleted. The project is NOT created finally. I just see a package-lock.json at the end
I'm editing this post with a pattern I've recently been seeing.
Just for a Change I tried doing TNS CREATE with VUE JS, it fails exactly in the POSTINSTALL JS script.
Any idea what I can do to get rid of this issue. This has been wasting my time for over 2 days now.
Here is the log
EDIT --- NEW LOG WITH Node Version 10
Eshcols-iMac:NativeScript eshcol$ sudo tns create
Let’s create a NativeScript app!
Answer the following questions to help us build the right app for you. (Note: you
can skip this prompt next time using the --template option, or the --ng, --vue, --ts,
or --js flags.)
? First, what will be the name of your app? TestApp
? Next, which style of NativeScript project would you like to use: Angular
? Finally, which template would you like to start from: Hello World
fsevents#1.2.7 install /Users/eshcol/NativeScript/TestApp/node_modules/fsevents
node install
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Pre-built binaries not installable for fsevents#1.2.7 and node#10.15.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error EACCES: permission denied, mkdir '/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib'
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/build'
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/Cellar/node#10/10.15.0/bin/node" "/usr/local/Cellar/node#10/10.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node" "--module_name=fse" "--module_path=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64" "--napi_version=3" "--node_abi_napi=napi"
gyp ERR! cwd /Users/eshcol/NativeScript/TestApp/node_modules/fsevents
gyp ERR! node -v v10.15.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/Cellar/node#10/10.15.0/bin/node /usr/local/Cellar/node#10/10.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess. (/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/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 Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/Cellar/node#10/10.15.0/bin/node" "/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/eshcol/NativeScript/TestApp/node_modules/fsevents
node-pre-gyp ERR! node -v v10.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/Cellar/node#10/10.15.0/bin/node /usr/local/Cellar/node#10/10.15.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64/fse.node --module_name=fse --module_path=/Users/eshcol/NativeScript/TestApp/node_modules/fsevents/lib/binding/Release/node-v64-darwin-x64 --napi_version=3 --node_abi_napi=napi' (1)
nativescript-angular#7.1.2 postinstall /Users/eshcol/NativeScript/TestApp/node_modules/nativescript-angular
node postinstall.js
fs.js:115
throw err;
^
Error: EACCES: permission denied, mkdir '/Users/eshcol/NativeScript/TestApp/hooks'
at Object.mkdirSync (fs.js:753:3)
at Object. (/Users/eshcol/NativeScript/TestApp/node_modules/nativescript-angular/postinstall.js:11:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 (node_modules/fsevents):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.7 install: node install
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nativescript-angular#7.1.2 postinstall: node postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nativescript-angular#7.1.2 postinstall 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/eshcol/.npm/_logs/2019-02-02T15_47_24_931Z-debug.log
Command npm failed with exit code 1
tns create
To fix project creation in general you can try sudo chown -R username /home/username/.npm This should allow you to run tns create MyApp without adding sudo.

failed to install composer-cli but I see errors

I see the following errors when run command npm install -g composer-cli#0.20
nvm 0.33.0
npm 6.4.1
node 10.13.0
I'm trying to the Hyperledger in my local Mac OS
but it keep failing when I run the command.
I followed this guide to install it
https://hyperledger.github.io/composer/latest/installing/development-tools.html
here's the error part:
grpc#1.10.1 install /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library
node-pre-gyp ERR! Tried to download(403): https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.10.1/node-v64-darwin-x64-unknown.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for grpc#1.10.1 and node#10.13.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Pre-built binaries not installable for grpc#1.10.1 and node#10.13.0 (node-v64 ABI, unknown) (falling back to source compile with node-gyp)
node-pre-gyp ERR! Hit error Connection closed while downloading tarball file
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
gyp WARN download NVM_NODEJS_ORG_MIRROR is deprecated and will be removed in node-gyp v4, please use NODEJS_ORG_MIRROR
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o
sed: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/avl/avl.o
rm: ./Release/.deps/Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o.d.raw: No such file or directory
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/surface/init.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/Users/jason/.nvm/versions/node/v10.13.0/bin/node" "/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc
gyp ERR! node -v v10.13.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 '/Users/jason/.nvm/versions/node/v10.13.0/bin/node /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/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 Darwin 17.4.0
node-pre-gyp ERR! command "/Users/jason/.nvm/versions/node/v10.13.0/bin/node" "/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc
node-pre-gyp ERR! node -v v10.13.0
node-pre-gyp ERR! node-pre-gyp -v v0.7.0
node-pre-gyp ERR! not ok
Failed to execute '/Users/jason/.nvm/versions/node/v10.13.0/bin/node /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown' (1)
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/backoff/backoff.oe
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_args.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack.o
CXX(target) Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o
In file included from ../deps/grpc/src/core/lib/channel/channel_stack_builder.cc:19:
In file included from ../deps/grpc/src/core/lib/channel/channel_stack_builder.h:24:
../deps/grpc/src/core/lib/channel/channel_args.h:22:10: fatal error:
'grpc/compression.h' file not found
#include <grpc/compression.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.░⸩ ⠏ install: info lifecycle grpc#1.10.1~install: Failed to e
make: *** [Release/obj.target/grpc/deps/grpc/src/core/lib/channel/channel_stack_builder.o] Error 1
gyp ERR! build error ⠏ install: info lifecycle grpc#1.10.1~install: Failed to e
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Darwin 17.4.0
gyp ERR! command "/Users/jason/.nvm/versions/node/v10.13.0/bin/node" "/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc/src/node/extension_binary/node-v64-darwin-x64-unknown"
gyp ERR! cwd /Users/jason/.nvm/versions/node/v10.13.0/lib/node_modules/composer-cli/node_modules/grpc
gyp ERR! node -v v10.13.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! grpc#1.10.1 install: `node-pre-gyp install --fallback-to-build --library=static_library`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the grpc#1.10.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! /Users/jason/.npm/_logs/2018-10-31T02_08_58_962Z-debug.log
This is because node has just released node 10 as lts and the prereqs-ubuntu.sh script installs the lts version of node so you are now getting node 10.
It's easy to fix, just before installing composer just run the following commands
nvm install 8
nvm use 8
this will install node 8 and then you are ready to install composer.
This error occurs due to incompatibility of node version. You have to downgrade your node version to 8.x.x.
Just follow the steps written below:
First search for your desired package:
brew search node
This will give you the follow results:
leafnode node node#6 nodebrew
libbitcoin-node node-build node#8 nodeenv
llnode node#10 ✔ node_exporter nodenv
....
And then install the desired version:
brew install node#8
Also remember that you can install more than 1 node package at the same time, but you cannot have them available at the same time. So if you have the latest/generic node package already installed you need to unlink it first:
brew unlink node
And then you can link a different version:
brew link node#8
Now you can install composer-cli.
Note: Run the composer-tools installation commands without sudo or
root.

Yeoman Meanjs generator unable to get local issuer certificate

The company I work for uses a Zscaler proxy and I am trying to get the meanjs yeoman generator to work on my Windows 10 machine. So far I have managed to get npm to work by setting the proxy, https-proxy and the registry as follows:
npm config set proxy http://gateway.zscalerone.net/80
npm config set https-proxy http://gateway.zscalerone.net/80
npm config set registry http://registry.npmjs.org/
however when I run:
yo meanjs
I get the following:
Running npm install for you....
This may take a couple minutes.
Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "cd mean && npm install"
npm WARN deprecated minimatch#2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.2.14: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated minimatch#0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated graceful-fs#1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated graceful-fs#2.0.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated jade#0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated graceful-fs#3.0.8: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs#^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN deprecated lodash#1.0.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^4.0.0.
npm WARN deprecated minimatch#1.0.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global node-gyp#3.3.1 should be installed with -g
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\AppData\\Roaming\\nvm\\v4.4.5\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\bufferutil
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:bufferutil#1.2.1 bufferutil#1.2.1 install: `node-gyp rebuild`
npm WARN install:bufferutil#1.2.1 Exit status 1
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\AppData\\Roaming\\nvm\\v4.4.5\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\utf-8-validate
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm WARN install:utf-8-validate#1.2.1 utf-8-validate#1.2.1 install: `node-gyp rebuild`
npm WARN install:utf-8-validate#1.2.1 Exit status 1
node-pre-gyp ERR! Tried to download: https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v46-win32-ia32.tar.gz
node-pre-gyp ERR! Pre-built binaries not found for v8-debug#0.7.7 and node#4.4.5 (node-v46 ABI) (falling back to source compile with node-gyp)
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: unable to get local issuer certificate
gyp ERR! stack at Error (native)
gyp ERR! stack at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
gyp ERR! stack at emitNone (events.js:67:13)
gyp ERR! stack at TLSSocket.emit (events.js:166:7)
gyp ERR! stack at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
gyp ERR! stack at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
gyp ERR! System Windows_NT 10.0.10240
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\v8-debug\\build\\debug\\v0.7.7\\node-v46-win32-ia32\\debug.node" "--module_name=debug" "--module_path=C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\v8-debug\\build\\debug\\v0.7.7\\node-v46-win32-ia32" "--msvs_version=2015"
gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug
gyp ERR! node -v v4.4.5
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Users\ShaneH\Code\temp\mean\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug\build\debug\v0.7.7\node-v46-win32-ia32\debug.node --module_name=debug --module_path=C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug\build\debug\v0.7.7\node-v46-win32-ia32 --msvs_version=2015' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\ShaneH\Code\temp\mean\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
node-pre-gyp ERR! stack at emitTwo (events.js:87:13)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:172:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:827:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
node-pre-gyp ERR! System Windows_NT 10.0.10240
node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\ShaneH\\Code\\temp\\mean\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd C:\Users\ShaneH\Code\temp\mean\node_modules\v8-debug
node-pre-gyp ERR! node -v v4.4.5
node-pre-gyp ERR! node-pre-gyp -v v0.6.28
node-pre-gyp ERR! not ok
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.12
npm WARN eslint-config-airbnb#6.0.2 requires a peer of eslint-plugin-react#^4.0.0 but none was installed.
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v4.4.5
npm ERR! npm v3.9.6
npm ERR! code ELIFECYCLE
npm ERR! v8-debug#0.7.7 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-debug#0.7.7 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the v8-debug package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-pre-gyp install --fallback-to-build
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs v8-debug
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls v8-debug
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\ShaneH\Code\temp\mean\npm-debug.log
at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Which seems to indicate that it can't connect via https to
https://node-inspector.s3.amazonaws.com/debug/v0.7.7/node-v46-win32-ia32.tar.gz
I have tried setting up http_proxy and https_proxy environment variables, but this doesn't seem to have made a difference. I am also able to browse to that URL in a browser without an issue.
I assume the error has to do with the way Zscaler is handling https. Any help would be greatly appreciated.

Resources