Flow-typed : UNCAUGHT ERROR: Error: Invalid npm libdef version! It appears to be a non-continugous range
Asked Answered
D

2

6

I am getting following when trying to install flow-types

yarn run flow-typed install

Error

• Found 29 dependencies in package.json to install libdefs for. Searching...
• flow-typed cache not found, fetching from GitHub...
UNCAUGHT ERROR: Error: Invalid npm libdef version! It appears to be a non-continugous range.
    at pkgVersionMatch (/home/.../projectName/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:256:11)
    at /home/.../projectName/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:281:82
    at Array.filter (<anonymous>)
    at filterLibDefs (/home/.../projectName/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:275:15)
    at findNpmLibDef (/home/k.../projectName/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:329:27)
    at async /home/.../projectName/node_modules/flow-typed/dist/commands/install.js:273:20
    at async Promise.all (index 20)
    at async installNpmLibDefs (/home/.../projectName/node_modules/flow-typed/dist/commands/install.js:268:3)
    at async Object.run (/home/.../projectName/node_modules/flow-typed/dist/commands/install.js:149:27)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

What I tried?

  • Cleaning .flow-typed cache in home folder and retrying
  • Deleting node_modules folder and retrying
Dyad answered 15/1, 2021 at 7:51 Comment(3)
github.com/flow-typed/flow-typed/issues/3988 related issueArk
This has just been merged and should be fixed once version 3.2.2 of the cli has been released.Ark
@Ark Please go ahead and write an answer what happened how it was fixed, so I could accept it. since you made the PR you deserve the credit.Dyad
A
2

The issue is caused by a loose dependency of flow-typed cli (semver) that broke the flow-typed installer. This has been fixed and we've since locked the version.

To fix this issue update beyond v3.2.1 (to v3.3.0).

Fix reference + explanation: https://github.com/flow-typed/flow-typed/pull/4018

Ark answered 14/2, 2021 at 7:46 Comment(2)
There is no version 3.2.2 yetPatin
It's just been released! v3.3.0 is the one you wantArk
G
0

https://github.com/flow-typed/flow-typed/issues/3988#issuecomment-768598799

This fixed it for me, check that your flow-bin dependancy does not contain a ^

Guthrie answered 12/2, 2021 at 9:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.