Coder Social home page Coder Social logo

Comments (21)

jeffmo avatar jeffmo commented on May 16, 2024 2

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.

from flow-typed.

johnhaley81 avatar johnhaley81 commented on May 16, 2024 2

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.

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024 1

Looks like nodegit is the problem... and they seem to have a fix with version 0.13.1:
https://github.com/nodegit/nodegit/releases/tag/v0.13.1

from flow-typed.

valscion avatar valscion commented on May 16, 2024 1

I can confirm that I can now install flow-typed after #162 landed, hooray! However, I still seem to have a nasty issue where I'm not able to install any libdefs, but that's another issue.

EDIT: If anyone wonders what that issue was, it was #173

from flow-typed.

jeffmo avatar jeffmo commented on May 16, 2024

Consolidating @ryyppy's comment from #4:

@valscion Hmm... strange, so I could install it successfully with node version 4.0.0... then I tried it with 4.4.0 and it failed for me as well...

from flow-typed.

jeffmo avatar jeffmo commented on May 16, 2024

@valscion Can you confirm that rm -rf node_modules && npm install (which should hopefully install the patch release) fixes the issue?

from flow-typed.

andreypopp avatar andreypopp commented on May 16, 2024

Just for the record: having the same issues with pnpm installer (on a clean install).

UPDATE: it fetches nodegit 0.13.2 which contains fixes. I will report the issue to nodegit.

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024

I tried some things... So when I npm install locally in the checked out project, it works like a charm (node 4.4.0), because it uses [email protected] ... if I install it via npm install flow-typed -g, it apparently fetches the wrong version of nodegit and fails... not sure how to fix this

from flow-typed.

jeffmo avatar jeffmo commented on May 16, 2024

@ryyppy: What happens if you npm uninstall -g flow-typed and then re-npm install -g flow-typed?

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024

I really tried absolutely everything... I even did rm -rf ~/.npm && npm cache clear to make sure I don't use any funky caching in the background... I need more time to investigate... maybe node broke something with their node-gyp processes? who knows...

Edit: OH WAIT, I use npm v2... this might cause problems...

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024

Oh dude.... it's npm v2 which causes problems... don't ask me why.
I did npm install -g npm and now it builds... not sure how we can serve npm v2 users though

\cc @valscion

from flow-typed.

jeffmo avatar jeffmo commented on May 16, 2024

ohh, I think npm v2 doesn't auto-flatten (whereas v3 does). I'm about to send a PR for #76 -- so I'll try bumping the minimum-viable version to 0.13.2 in package.json in that and see if it helps

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024

That's a good idea,... this would also be useful to publish a new version beta.6 , so we can provide the update-cache command for #142

from flow-typed.

valscion avatar valscion commented on May 16, 2024

Very strange. Globally installing npm install -g [email protected] still fails (I tried without the exact version specified, too), but if I npm link directly from the cli directory here, the manual compilation eventually succeeds. See gist for precise output: https://gist.github.com/valscion/aeb457470d524c8c71710ff46830cfc3

Maybe it has something to do with dependencies that are needed for the build and are listed only as devDependencies? That would explain why npm link succeeds, even if it needs a manual compilation, compared to a global installation.

EDIT: That is, the deveDependencies of nodegit..? As they seem to be installed when running npm link but not when running npm install -g flow-typed.

from flow-typed.

ryyppy avatar ryyppy commented on May 16, 2024

@valscion Did you use npm >= v3?

from flow-typed.

valscion avatar valscion commented on May 16, 2024

No, I used the same npm version as I can't yet use npm3

from flow-typed.

valscion avatar valscion commented on May 16, 2024

Well thats fun.

If I add the needed nodegit packages, npm install --save nopt npmlog@^2.0.0 rimraf tar, inside the cli directory, then running npm link will not trigger a rebuild of nodegit from sources.

This is likely related to nodegit/nodegit#1052

Maybe nodegit dependencies are botched?


Digging deeper, I found out that these packages should come from node-pre-gyp already. But as node-pre-gyp had at some point incorrectly pointed out that you should add node-pre-gyp as bundledDependencies, and nodegit does indeed that, it might result in node-pre-gyp missing the required dependencies and thus causing all sorts of native compilation issues.

I'll dig deeper, see if I can resolve this issue all the way on nodegit level by modifying the package.json.

from flow-typed.

valscion avatar valscion commented on May 16, 2024

Nah still getting issues :( I can npm link from the cli directory, though, even without adding any packages I told above (so scrap that) but that also ends up compiling nodegit from the sources.

I even uninstalled my node installed via nvm and reinstalled it, but still the same issue prevails.

Seems like nodegit is having more issues than we thought: nodegit/nodegit#1052

➜  cli git:(master) npm link
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
/
> [email protected] postinstall /Users/vesa/code/muut/flow-typed/cli/node_modules/flow-bin
> node lib/install.js

  ✔ flow binary test passed successfully

> [email protected] postinstall /Users/vesa/code/muut/flow-typed/cli/node_modules/jest-cli
> node postinstall.js

|
> [email protected] install /Users/vesa/code/muut/flow-typed/cli/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/Users/vesa/code/muut/flow-typed/cli/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote
-
> [email protected] install /Users/vesa/code/muut/flow-typed/cli/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/code/muut/flow-typed/cli/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/code/muut/flow-typed/cli/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/code/muut/flow-typed/cli/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

--- clip lots of native build output ---

from flow-typed.

valscion avatar valscion commented on May 16, 2024

Thanks! It's a shame that a downgrade is needed. I was a bit optimistic that we could've found the root cause but as I've banged my head against the wall with this one for a few hours already without making progress, or knowing where to dig deeper, I'm quite lost.

Hopefully nodegit will get these issues sorted out. I'm rooting for nodegit/nodegit#1055 to make debugging this issue far easier, even fixing it if all goes well.

from flow-typed.

johnhaley81 avatar johnhaley81 commented on May 16, 2024

@valscion I have nodegit/nodegit#1055 passing now. What would be the best way for me to test this in flow-typed?

from flow-typed.

valscion avatar valscion commented on May 16, 2024

Awesome, thanks a lot @johnhaley81! 😍

from flow-typed.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.