Flow-typed install crashes if you have a package installed from a git URL
See original GitHub issueHere is the crash:
UNCAUGHT ERROR: Error: Malformed npm package name! Expected the name to be formatted as <PKGNAME>_v<MAJOR>.<MINOR>.<PATCH> but instead got mtwins
at parsePkgNameVer (/Users/noah.allen/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:295:11)
at _callee6$ (/Users/noah.allen/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:620:38)
at tryCatch (/Users/noah.allen/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (/Users/noah.allen/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.(anonymous function) [as next] (/Users/noah.allen/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:97:21)
at asyncGeneratorStep (/Users/noah.allen/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:56:103)
at _next (/Users/noah.allen/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:58:194)
at <anonymous>
As you can see, it got “mtwins” instead of what it was expecting. This matches a package I have linked through git: (note, I do have several more dependencies that I did not list here)
"dependencies": {
"lottie-react-native": "^2.6.1",
"rn-tooltip": "git+https://github.com/mtwins/rn-tooltip.git"
},
This happens when running:
flow-typed install lottie-react-native
(a package I recently installed).flow-typed install
To get around this, I have to:
rm -rf flow-typed
flow-typed install
. This works successfully, unlike before deleting the folder
Issue Analytics
- State:
- Created 4 years ago
- Reactions:18
- Comments:18 (13 by maintainers)
Top Results From Across the Web
node.js - Flow doesn't consider flow-typed's installed definitions
My project has the following structure: + src + index.js ` Server.js + node_modules + express + flow-typed + npm ` express_v4.x.x.js. When...
Read more >flow-typed-with-use-cache-until - npm package - Snyk
flow-typed is a repository of third-party library interface definitions for use with Flow. You can grab definitions directly from this GitHub ...
Read more >Introducing Flow-Typed - JavaScript. Flow
We 've built a simple CLI tool called flow-typed that helps to automate the process of finding, installing, and upgrading libdefs in your...
Read more >Flow | Checking third-party code
It's always possible to write a libdef file yourself if you need to, ... Then, from within your project directory, run flow-typed install...
Read more >eslint-plugin-flowtype - npm
Add plugins section and specify eslint-plugin-flowtype as a plugin. ... "as-needed" enforces no braces where they can be omitted.
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
This is regression the latest minor release - can work around by pinning to the previous version:
Still happens for me with 2.6.2 😦