`npm install -g flow-typed` fails on node v4.4.0 and npm 2.x
See original GitHub issueCreated a new issue from the comment on #4.
Running on OS X El Capitan, npm version 2.15.2 and node v4.4.0, I get this:
$ npm install flow-typed -g
-
> nodegit@0.13.2 install /Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/flow-typed/node_modules/nodegit
> node lifecycleScripts/install
[nodegit] Fetching binary from S3.
[nodegit] Failed to install prebuilt binary:
{ [Error: Command failed: /bin/sh -c "/Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/flow-typed/node_modules/nodegit/node_modules/.bin/node-pre-gyp" install --fallback-to-build=false
module.js:327
throw err;
^
Error: Cannot find module 'nopt'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/flow-typed/node_modules/nodegit/node_modules/node-pre-gyp/lib/node-pre-gyp.js:14:12)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
]
killed: false,
code: 1,
signal: null,
cmd: '/bin/sh -c "/Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/flow-typed/node_modules/nodegit/node_modules/.bin/node-pre-gyp" install --fallback-to-build=false' }
[nodegit] Building manually. (You'll be here a while.)
[nodegit] Regenerating and configuring code
nodegit@0.13.2 /Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/nodegit
├── promisify-node@0.3.0 (nodegit-promise@4.0.0)
└── fs-extra@0.26.7 (path-is-absolute@1.0.0, klaw@1.3.0, graceful-fs@4.1.4, jsonfile@2.3.1, rimraf@2.5.2)
[nodegit] Configuring libssh2.
ERROR - Could not generate native code
[TypeError: _(...).forEach(...).value is not a function]
[nodegit] Everything is ready to go, attempting compilation
events.js:141
throw er; // Unhandled 'error' event
^
Error: spawn /Users/vesa/.nvm/versions/node/v4.4.0/lib/node_modules/flow-typed/node_modules/nodegit/node_modules/.bin/node-gyp ENOENT
at exports._errnoException (util.js:870:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
at onErrorNT (internal/child_process.js:344:16)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickCallback (node.js:356:17)
npm ERR! Darwin 15.5.0
npm ERR! argv "/Users/vesa/.nvm/versions/node/v4.4.0/bin/node" "/Users/vesa/.nvm/versions/node/v4.4.0/bin/npm" "install" "flow-typed" "-g"
npm ERR! node v4.4.0
npm ERR! npm v2.15.2
npm ERR! code ELIFECYCLE
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (20 by maintainers)
Top Results From Across the Web
NPM install fails with node-gyp - Stack Overflow
Option 1: Install Visual C++ Build Tools using the Default Install option. Option 2: Install Visual Studio 2015 (or modify an existing installation)...
Read more >immutable - npm
Install immutable using npm. npm install immutable. Or install using yarn. yarn add immutable. Then require it into any module.
Read more >Node v16.15.1 (npm v8.11.0) breaks some builds
1 when I do an `npm install --legacy-peer-deps`, all dependencies are correctly installed and I can start my app. but when my CI...
Read more >Npm package installation error on other partition
I'm getting this error whenever I install a package from npm on another ... npm@8.5.5 2 info using node@v17.8.0 3 timing npm:load:whichnode ......
Read more >Npm install command failing with message "could not find ...
When I run the npm install command, npm starts downloading the ... it ends with ok npm ERR! gyp info using node-gyp@7.1.2 npm...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hmm… so digging into this more, it is exactly the
bundledDependencies
that is the problem. I’m adding that fix to the PR and in my local tests it seems to indeed fix the issue you guys are having.This is unfortunate 😕 Given that nodegit 0.13 was a big update (and was relatively recent), maybe it’s worth looking into switching back to v0.12.2 for a while while they get the kinks worked out.
I’ll look into this this week.