I am getting following error while trying to install hyperledger composer on my ubuntu:
60822 verbose stack Error: pkcs11js#1.0.13 install: `node-gyp rebuild`
60822 verbose stack Exit status 1
60822 verbose stack at EventEmitter.<anonymous>
(/usr/share/npm/lib/utils/lifecycle.js:232:16)
60822 verbose stack at emitTwo (events.js:87:13)
60822 verbose stack at EventEmitter.emit (events.js:172:7)
60822 verbose stack at ChildProcess.<anonymous>
(/usr/share/npm/lib/utils/spawn.js:24:14)
60822 verbose stack at emitTwo (events.js:87:13)
60822 verbose stack at ChildProcess.emit (events.js:172:7)
60822 verbose stack at maybeClose (internal/child_process.js:821:16)
60822 verbose stack at Process.ChildProcess._handle.onexit
60825 error Linux 4.13.0-37-generic
60826 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "generator-hyperledger-composer"
60827 error node v4.2.6
60828 error npm v3.5.2
60829 error code ELIFECYCLE
60830 error pkcs11js#1.0.13 install: `node-gyp rebuild`
60830 error Exit status 1
Can someone tell me what to do?
I had the same issue when I was trying to install composer-cli. I was running sudo npm install -g composer-cli to install it. So if you're doing the same way (using sudo) try to just run the install command without sudo. This worked for me on Mac.
Related
I was trying to install some magento storefront app that requires linux to run on WSL. I managed to get most things working, but in the end I'm stuck at trying to install the dependencies. When it tries to install node-sass, I get this error:
make: Leaving directory '/mnt/c/Github/psp-storefront-magento2/node_modules/node-sass/build'
make: *** [binding.target.mk:133: Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/mnt/c/Github/psp-storefront-magento2/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (node:events:390:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
gyp ERR! System Linux 4.4.0-19041-Microsoft
gyp ERR! command "/home/lursmani/.nvm/versions/node/v16.10.0/bin/node" "/mnt/c/Github/psp-storefront-magento2/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /mnt/c/Github/psp-storefront-magento2/node_modules/node-sass
gyp ERR! node -v v16.10.0
I read that deleting yarn.lock and installing again should fix this, but it hasn't helped in my case. Would greatly appreciate some help with this, if anyone knows what's funky here.
I found the solution. Apparently GYP has issues with the latest version of Node (16). I had to downgrade to Node 14 and then it worked correctly.
I have a problem with yarn add && yard build.
Especially node-sass
Whenever I'm trying to run node-sass it is giving me this error
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/user/all001/app/themes/alliance/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Linux 4.15.0-54-generic
gyp ERR! command "/home/user/.nvm/versions/node/v14.4.0/bin/node" "/home/user/all001/app/themes/alliance/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/user/all001/app/themes/alliance/node_modules/node-sass
gyp ERR! node -v v14.4.0
gyp ERR! node-gyp -v v3.8.0
I really don't know how to fix this. Any suggestions, please?
I encountered the same error message when performing npm install node-sass. The only solution for me at the moment is to choose an older node version. Both v14 and v12 did not work, so I went back to v10. Luckily I had Node installed using nvm. You can run nvm install v10.22.1, for example. Use nvm ls-remote to see the available versions.
One difference, however, is that I tried to execute it on a Mac (System Darwin 19.6.0)
Following a Hyperledger Dev course https://hyperledger.github.io/composer/latest/installing/development-tools.html
And ran the npm install -g composer-cli command on Mac OS. It doesn't seem like a permissions problem, I've had those before. This is the line that stands out to me from the log below;
Failed at the grpc#1.10.1 install script.
I am running NPM version 6.7.0 and Node version 11.10.0
18655 silly install grpc#1.10.1
18656 info lifecycle grpc#1.10.1~install: grpc#1.10.1
18657 verbose lifecycle grpc#1.10.1~install: unsafe-perm in lifecycle true
18658 verbose lifecycle grpc#1.10.1~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/composer-cli/node_modules/grpc/node_modules/.bin:/usr/local/lib/node_modules/composer-cli/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Frameworks/Mono.framework/Versions/Current/Commands
18659 verbose lifecycle grpc#1.10.1~install: CWD: /usr/local/lib/node_modules/composer-cli/node_modules/grpc
18660 silly lifecycle grpc#1.10.1~install: Args: [ '-c',
18660 silly lifecycle 'node-pre-gyp install --fallback-to-build --library=static_library' ]
18661 silly lifecycle grpc#1.10.1~install: Returned: code: 1 signal: null
18662 info lifecycle grpc#1.10.1~install: Failed to exec install script
18663 timing action:install Completed in 40426ms
18664 verbose unlock done using /Users/mu/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
18665 timing stage:rollbackFailedOptional Completed in 1847ms
18666 timing stage:runTopLevelLifecycles Completed in 62690ms
18667 verbose stack Error: grpc#1.10.1 install:node-pre-gyp install --fallback-to-build --library=static_library
18667 verbose stack Exit status 1
18667 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
18667 verbose stack at EventEmitter.emit (events.js:197:13)
18667 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
18667 verbose stack at ChildProcess.emit (events.js:197:13)
18667 verbose stack at maybeClose (internal/child_process.js:984:16)
18667 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
18668 verbose pkgid grpc#1.10.1
18669 verbose cwd /Users/mu/Documents/Hyperledger
18670 verbose Darwin 18.2.0
18671 verbose argv "/usr/local/Cellar/node/11.10.0/bin/node" "/usr/local/bin/npm" "install" "-g" "composer-cli"
18672 verbose node v11.10.0
18673 verbose npm v6.7.0
18674 error code ELIFECYCLE
18675 error errno 1
18676 error grpc#1.10.1 install:node-pre-gyp install --fallback-to-build --library=static_library
18676 error Exit status 1
18677 error Failed at the grpc#1.10.1 install script.
18677 error This is probably not a problem with npm. There is likely additional logging output above.
18678 verbose exit [ 1, true ]
You need to use node version 8.9 or higher but 9 or higher than that arenot supported and npm 5.x. It is clearly specified in pre-requisities section
I am trying to install terminalizer on OSX using npm but I get error with and without using sudo. Not sure how I can proceed with fixing it and installing it successfully:
$ npm install -g terminalizer
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! path /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/local/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/local/lib/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/mona/.npm/_logs/2018-12-22T21_48_44_353Z-debug.log
Monas-MacBook-Pro:NotebooksforMLReview mona$ sudo npm install -g terminalizer
Password:
/usr/local/bin/terminalizer -> /usr/local/lib/node_modules/terminalizer/bin/app.js
> node-pty-prebuilt#0.7.6 install /usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js
prebuild-install WARN install EACCES: permission denied, access '/Users/mona/.npm'
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/mona/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at maybeClose (internal/child_process.js:962:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
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" "rebuild" "--build_v8_with_gn=false"
gyp ERR! cwd /usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt
gyp ERR! node -v v10.14.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-pty-prebuilt#0.7.6 install: `prebuild-install || node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-pty-prebuilt#0.7.6 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/mona/.npm/_logs/2018-12-22T21_49_13_893Z-debug.log
Monas-MacBook-Pro:NotebooksforMLReview mona$ vi /Users/mona/.npm/_logs/2018-12-22T21_49_13_893Z-debug.log
I have the following:
$ uname -a
Darwin Monas-MacBook-Pro.local 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:59:54 PDT 2018; root:xnu-4570.71.2~2/RELEASE_X86_64 x86_64
$ npm -v
6.4.1
and the last 100 lines of the log:
$ tail -100 /Users/mona/.npm/_logs/2018-12-22T21_49_13_893Z-debug.log
6955 info lifecycle tar-stream#1.6.2~install: tar-stream#1.6.2
6956 silly install inflight#1.0.6
6957 info lifecycle inflight#1.0.6~install: inflight#1.0.6
6958 silly install glob#7.1.3
6959 info lifecycle glob#7.1.3~install: glob#7.1.3
6960 silly install rimraf#2.6.2
6961 info lifecycle rimraf#2.6.2~install: rimraf#2.6.2
6962 silly install fs-extra#0.30.0
6963 info lifecycle fs-extra#0.30.0~install: fs-extra#0.30.0
6964 silly install pump#2.0.1
6965 info lifecycle pump#2.0.1~install: pump#2.0.1
6966 silly install simple-get#2.8.1
6967 info lifecycle simple-get#2.8.1~install: simple-get#2.8.1
6968 silly install pump#1.0.3
6969 info lifecycle pump#1.0.3~install: pump#1.0.3
6970 silly install tar-fs#1.16.3
6971 info lifecycle tar-fs#1.16.3~install: tar-fs#1.16.3
6972 silly install prebuild-install#5.2.2
6973 info lifecycle prebuild-install#5.2.2~install: prebuild-install#5.2.2
6974 silly install xtend#2.1.2
6975 info lifecycle xtend#2.1.2~install: xtend#2.1.2
6976 silly install through2#0.2.3
6977 info lifecycle through2#0.2.3~install: through2#0.2.3
6978 silly install progress-stream#1.2.0
6979 info lifecycle progress-stream#1.2.0~install: progress-stream#1.2.0
6980 silly install nugget#2.0.1
6981 info lifecycle nugget#2.0.1~install: nugget#2.0.1
6982 silly install electron-download#3.3.0
6983 info lifecycle electron-download#3.3.0~install: electron-download#3.3.0
6984 silly install y18n#4.0.0
6985 info lifecycle y18n#4.0.0~install: y18n#4.0.0
6986 silly install camelcase#5.0.0
6987 info lifecycle camelcase#5.0.0~install: camelcase#5.0.0
6988 silly install yargs-parser#11.1.1
6989 info lifecycle yargs-parser#11.1.1~install: yargs-parser#11.1.1
6990 silly install ansi-regex#3.0.0
6991 info lifecycle ansi-regex#3.0.0~install: ansi-regex#3.0.0
6992 silly install find-up#3.0.0
6993 info lifecycle find-up#3.0.0~install: find-up#3.0.0
6994 silly install is-fullwidth-code-point#2.0.0
6995 info lifecycle is-fullwidth-code-point#2.0.0~install: is-fullwidth-code-point#2.0.0
6996 silly install strip-ansi#4.0.0
6997 info lifecycle strip-ansi#4.0.0~install: strip-ansi#4.0.0
6998 silly install string-width#2.1.1
6999 info lifecycle string-width#2.1.1~install: string-width#2.1.1
7000 silly install yauzl#2.4.1
7001 info lifecycle yauzl#2.4.1~install: yauzl#2.4.1
7002 silly install extract-zip#1.6.7
7003 info lifecycle extract-zip#1.6.7~install: extract-zip#1.6.7
7004 silly install async-promises#0.2.1
7005 info lifecycle async-promises#0.2.1~install: async-promises#0.2.1
7006 silly install death#1.1.0
7007 info lifecycle death#1.1.0~install: death#1.1.0
7008 silly install deepmerge#2.2.1
7009 info lifecycle deepmerge#2.2.1~install: deepmerge#2.2.1
7010 silly install electron#2.0.16
7011 info lifecycle electron#2.0.16~install: electron#2.0.16
7012 silly install flowa#4.0.2
7013 info lifecycle flowa#4.0.2~install: flowa#4.0.2
7014 silly install fs-extra#5.0.0
7015 info lifecycle fs-extra#5.0.0~install: fs-extra#5.0.0
7016 silly install gif-encoder#0.6.1
7017 info lifecycle gif-encoder#0.6.1~install: gif-encoder#0.6.1
7018 silly install inquirer#6.2.1
7019 info lifecycle inquirer#6.2.1~install: inquirer#6.2.1
7020 silly install js-yaml#3.12.0
7021 info lifecycle js-yaml#3.12.0~install: js-yaml#3.12.0
7022 silly install node-pty-prebuilt#0.7.6
7023 info lifecycle node-pty-prebuilt#0.7.6~install: node-pty-prebuilt#0.7.6
7024 verbose lifecycle node-pty-prebuilt#0.7.6~install: unsafe-perm in lifecycle false
7025 verbose lifecycle node-pty-prebuilt#0.7.6~install: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt/node_modules/.bin:/usr/local/lib/node_modules/terminalizer/node_modules/.bin:/usr/local/lib/node_modules/.bin:/Users/mona/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
7026 verbose lifecycle node-pty-prebuilt#0.7.6~install: CWD: /usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt
7027 silly lifecycle node-pty-prebuilt#0.7.6~install: Args: [ '-c', 'prebuild-install || node scripts/install.js' ]
7028 silly lifecycle node-pty-prebuilt#0.7.6~install: Returned: code: 1 signal: null
7029 info lifecycle node-pty-prebuilt#0.7.6~install: Failed to exec install script
7030 timing action:install Completed in 627ms
7031 verbose unlock done using /Users/mona/.npm/_locks/staging-3a08f0df5026584d.lock for /usr/local/lib/node_modules/.staging
7032 timing stage:rollbackFailedOptional Completed in 922ms
7033 timing stage:runTopLevelLifecycles Completed in 11566ms
7034 verbose stack Error: node-pty-prebuilt#0.7.6 install: `prebuild-install || node scripts/install.js`
7034 verbose stack Exit status 1
7034 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
7034 verbose stack at EventEmitter.emit (events.js:182:13)
7034 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
7034 verbose stack at ChildProcess.emit (events.js:182:13)
7034 verbose stack at maybeClose (internal/child_process.js:962:16)
7034 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5)
7035 verbose pkgid node-pty-prebuilt#0.7.6
7036 verbose cwd /Users/mona/machine learning/NotebooksforMLReview
7037 verbose Darwin 17.7.0
7038 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "terminalizer"
7039 verbose node v10.14.2
7040 verbose npm v6.4.1
7041 error code ELIFECYCLE
7042 error errno 1
7043 error node-pty-prebuilt#0.7.6 install: `prebuild-install || node scripts/install.js`
7043 error Exit status 1
7044 error Failed at the node-pty-prebuilt#0.7.6 install script.
7044 error This is probably not a problem with npm. There is likely additional logging output above.
7045 verbose exit [ 1, true ]
The following installed the Terminalizer (adding the --unsafe-perm flag) (please pitch in if there's a better solution. I am no expert in npm):
$ sudo npm install --unsafe-perm -g terminalizer
Password:
/usr/local/bin/terminalizer -> /usr/local/lib/node_modules/terminalizer/bin/app.js
> node-pty-prebuilt#0.7.6 install /usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt
> prebuild-install || node scripts/install.js
> electron#2.0.16 postinstall /usr/local/lib/node_modules/terminalizer/node_modules/electron
> node install.js
Downloading SHASUMS256.txt
[============================================>] 100.0% of 5.39 kB (5.39 kB/s)
> node-pty-prebuilt#0.7.6 postinstall /usr/local/lib/node_modules/terminalizer/node_modules/node-pty-prebuilt
> node scripts/post-install.js
+ terminalizer#0.6.0
added 292 packages from 214 contributors in 40.879s
I am trying to install ccxt on my Macbook Air using sudo npm install --save ccxt and encountered the following error:
> scrypt#6.0.3 preinstall /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
> node node-scrypt-preinstall.js
Error: Error: Command failed: ./configure
configure: error: in `/Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt/scrypt/scrypt-1.2.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
> scrypt#6.0.3 install /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/peterpham/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:557: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" "rebuild"
gyp ERR! cwd /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Applications/Xcode.app/Contents/Developer/Toolchains/package.json'
npm WARN Toolchains No description
npm WARN Toolchains No repository field.
npm WARN Toolchains No README data
npm WARN Toolchains No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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/peterpham/.npm/_logs/2018-08-30T04_34_20_141Z-debug.log
I have Xcode 9.4.1 installed and checked that my command line tools were installed in the Preferences > Location section like in this other stackoverflow question. I also tried out all of the following answers in my terminal to change directories and ownerships to no avail. Also tried just sudo npm install --save scrypt with the same error. It has possibly something to do with the anaconda env pathing.
I'm pretty sure it has to do with some configuration but I'm not sure what it is. If you need anymore information please tell me and I'll post it. I don't know where the configure.log is so I can't post it, I've tried to find it using resources online as well and am lost.
The key to solving the error was this part of the error code:
gyp ERR! stack Error: Command failed: /Users/peterpham/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
So I tried installing python 2.7, which didn't work. So I tried uninstalling Anaconda from my computer using App Cleaner and that did the trick. Afterwards I could run the command npm install --save ccxt!