Coder Social home page Coder Social logo

Comments (6)

sophiebits avatar sophiebits commented on April 26, 2024 1

Yes, @gabelevi is working on a solution to this since we need it at FB too.

from fbjs.

danvk avatar danvk commented on April 26, 2024

I ran into this today after updating to React 0.14 on a project. I nixed the errors by adding this to my .flowconfig:

[ignore]
.*react/node_modules/fbjs.*

from fbjs.

madbence avatar madbence commented on April 26, 2024

npm@3 flattens the directory structure, so with node@5 you should ignore .*node_modules/fbjs.* (my travis builds were failing with v5 node).

from fbjs.

sophiebits avatar sophiebits commented on April 26, 2024

Gonna partially commandeer this issue. Running flow with a fresh install of fbjs gives:

node_modules/react/node_modules/fbjs/lib/PromiseMap.js.flow:15
 15: var Deferred = require('Deferred');
                    ^^^^^^^^^^^^^^^^^^^ Deferred. Required module not found

node_modules/react/node_modules/fbjs/lib/PromiseMap.js.flow:17
 17: var invariant = require('invariant');
                     ^^^^^^^^^^^^^^^^^^^^ invariant. Required module not found

node_modules/react/node_modules/fbjs/lib/fetchWithRetries.js.flow:16
 16: var ExecutionEnvironment = require('ExecutionEnvironment');
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ExecutionEnvironment. Required module not found

node_modules/react/node_modules/fbjs/lib/fetchWithRetries.js.flow:19
 19: var sprintf = require('sprintf');
                   ^^^^^^^^^^^^^^^^^^ sprintf. Required module not found

node_modules/react/node_modules/fbjs/lib/fetchWithRetries.js.flow:20
 20: var fetch = require('fetch');
                 ^^^^^^^^^^^^^^^^ fetch. Required module not found

node_modules/react/node_modules/fbjs/lib/fetchWithRetries.js.flow:21
 21: var warning = require('warning');
                   ^^^^^^^^^^^^^^^^^^ warning. Required module not found


Found 6 errors

because we don't currently rewrite the require paths in .flow files so you're required to have haste module resolution in order to make things typecheck. If we relativize the requires this problem should hopefully go away.

from fbjs.

zpao avatar zpao commented on April 26, 2024

I think this should be pretty much fixed now that #182 shipped in v0.8.5. We had fixed the require issues a while back. #185 has one more piece that we're missing but it's not for fbjs directly at the moment.

from fbjs.

bchenSyd avatar bchenSyd commented on April 26, 2024

I had the same issue with -- [email protected]

?[0m?[0m
?[0m?[0;4mnode_modules/fbjs/lib/minBy.js.flow:27?[0m?[0m
?[0m?[0;1m 27: ?[0m?[0m    if (!seenFirst || ?[0m?[31mcompare(b, (minB: any))?[0m?[0m < 0) {?[0m?[0;1m
                           ^^^^^^^^^^^^^^^^^^^^^^^ function call. Function cannot be called on possibly null value?[0m?[0m?[0m?[0m
?[0m?[0;1m 27: ?[0m?[0m    if (!seenFirst || ?[0m?[31mcompare?[0m?[0m(b, (minB: any)) < 0) {?[0m?[0;1m
                           ^^^^^^^ null?[0m?[0m?[0m?[0m
?[0m?[0m
?[0m?[0;4mnode_modules/fbjs/lib/minBy.js.flow:27?[0m?[0m
?[0m?[0;1m 27: ?[0m?[0m    if (!seenFirst || ?[0m?[31mcompare(b, (minB: any))?[0m?[0m < 0) {?[0m?[0;1m
                           ^^^^^^^^^^^^^^^^^^^^^^^ function call. Function cannot be called on possibly undefined value?[0m?[0m?[0m?[0m
?[0m?[0;1m 27: ?[0m?[0m    if (!seenFirst || ?[0m?[31mcompare?[0m?[0m(b, (minB: any)) < 0) {?[0m?[0;1m
                           ^^^^^^^ undefined?[0m?[0m?[0m?[0m
?[0m?[0m
?[0m
Found 17 errors

sorry for the terrible display as I'm using git-bash on a windows box

from fbjs.

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.