question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

React-navigation makes `flow-typed install` fail

See original GitHub issue

Hi, when trying to install new typings for my project, I get an error caused by react-navigation having a CONTRIBUTING.md file in their folder.

Maxence-VirtualBox% flow-typed install
• Found 29 dependencies in package.json to install libdefs for. Searching...
• rebasing flow-typed cache...
UNCAUGHT ERROR: Error: react-navigation_v1.x.x/CONTRIBUTING.md: Unexpected file name. This directory can only contain test files or a libdef file named `react-navigation_v1.x.x.js`.
    at validationError (/home/maxence/.config/yarn/global/node_modules/flow-typed/dist/lib/validationErrors.js:14:11)
    at /home/maxence/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:113:53
    at Array.forEach (<anonymous>)
    at extractLibDefsFromNpmPkgDir$ (/home/maxence/.config/yarn/global/node_modules/flow-typed/dist/lib/npm/npmLibDefs.js:95:23)
    at tryCatch (/home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:65:40)
    at Generator.invoke [as _invoke] (/home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:303:22)
    at Generator.prototype.(anonymous function) [as next] (/home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:117:21)
    at tryCatch (/home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:65:40)
    at invoke (/home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:155:20)
    at /home/maxence/.config/yarn/global/node_modules/regenerator-runtime/runtime.js:165:13

I see two solutions to this. Either support having a CONTRIBUTING.md in the type definitions folders or delete react-nativation’s CONTRIBUTING.md. What do you guys think ?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
IanVScommented, Apr 10, 2018

You’re totally right, I doublechecked, and even though I ran yarn global add flow-typed and it told me that it installed 2.4.0, apparently I must have previously used npm i -g, because the version that was actually being used was 2.2.3. I was hoping to come back here and edit/remove my comment before you caught it, but you were too quick. Sorry for the noise/confusion. 😳

2reactions
IanVScommented, Apr 10, 2018

It seems the latest version is 2.4.0, which I have tried, and flow-typed install is still failing for this reason. What version are you referring to that works, @GAntoine?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add flow types to flowtype/flow-typed · Issue #3146 - GitHub
I ran into some flow issues. ... install flow-typed and shield react-navigate (I dont get the error but my experience makes me really ......
Read more >
React Navigation and flow-typed - Stack Overflow
A complex web application using many npm modules is very rarely going to be strongly typed throughout. The goal of strong typing in...
Read more >
Troubleshooting | React Navigation
Before troubleshooting an issue, make sure that you have upgraded to the latest available versions of the packages. You can install the latest...
Read more >
React Native Navigation: Tutorial with examples
In this React Native Navigation tutorial, we'll show you some examples of navigation patterns you can implement with React Navigation.
Read more >
How Authentication Flow works in React Native apps using ...
Mobile apps are made of screens that can vary in number depending on the app ... stack navigation, then install react-navigation-stack; for tabs...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found