I am running an Ec2 with Amazon and have node 7 installed successfully. I have also made sure that node-gyp is installed. I am currently trying to add on some other packages for titan-gremlin functionality and every install I get the same error message.
/root/.nvm/versions/node/v7.0.0/bin/ts-java -> /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/bin/ts-java.sh
/root/.nvm/versions/node/v7.0.0/bin/ts-java.js -> /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/bin/ts-java.js
> [email protected] install /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java
> node-gyp rebuild
sh: node-gyp: command not found
/root/.nvm/versions/node/v7.0.0/lib
└── (empty)
npm ERR! Linux 4.4.35-33.55.amzn1.x86_64
npm ERR! argv "/root/.nvm/versions/node/v7.0.0/bin/node" "/root/.nvm/versions/node/v7.0.0/bin/npm" "install" "-g" "ts-java"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
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 java package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs java
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls java
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
npm ERR! code 1
I am at the end of my rope. I have made sure that the node-gyp is accessible to all users. please help.
Here is debug log
verbose lifecycle [email protected]~install: PATH: /root/.nvm/versions/node/v7.0.0/lib/node_modules/npm/bin/node-gyp- bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin:/root/bin
11008 verbose lifecycle [email protected]~install: CWD: /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java
11009 silly lifecycle [email protected]~install: Args: [ '-c', 'node-gyp rebuild' ]
11010 info lifecycle [email protected]~install: Failed to exec install script
11011 verbose unlock done using /root/.npm/_locks/staging-bbc034c0b63d0621.lock for /root/.nvm/versions/node/v7.0.0/lib/node_modules/.staging
11012 silly rollbackFailedOptional Starting
11013 silly rollbackFailedOptional Finishing
11014 silly runTopLevelLifecycles Finishing
11015 silly install printInstalled
11016 verbose stack Error: [email protected] install: `node-gyp rebuild`
11016 verbose stack spawn ENOENT
11016 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/utils/spawn.js:33:16)
11016 verbose stack at emitTwo (events.js:106:13)
11016 verbose stack at ChildProcess.emit (events.js:191:7)
11016 verbose stack at maybeClose (internal/child_process.js:877:16)
11016 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
11017 verbose pkgid [email protected]
11018 verbose cwd /root
11019 error Linux 4.4.35-33.55.amzn1.x86_64
11020 error argv "/root/.nvm/versions/node/v7.0.0/bin/node" "/root/.nvm/versions/node/v7.0.0/bin/npm" "install" "-g" "ts-java"
11021 error node v7.0.0
11022 error npm v3.10.8
11023 error file sh
11024 error code ELIFECYCLE
11025 error errno ENOENT
11026 error syscall spawn
11027 error [email protected] install: `node-gyp rebuild`
11027 error spawn ENOENT
11028 error Failed at the [email protected] install script 'node-gyp rebuild'.
11028 error Make sure you have the latest version of node.js and npm installed.
11028 error If you do, this is most likely a problem with the java package,
11028 error not with npm itself.
11028 error Tell the author that this fails on your system:
11028 error node-gyp rebuild
11028 error You can get information on how to open an issue for this project with:
11028 error npm bugs java
11028 error Or if that isn't available, you can get their info via:
11028 error npm owner ls java
11028 error There is likely additional logging output above.
11029 verbose exit [ 1, true ]
I ended up needing to install gyp using
Thanks to anyone who took the time to look at the question.