Comments (6)
Yes, @gabelevi is working on a solution to this since we need it at FB too.
from fbjs.
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.
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.
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.
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.
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)
- CVE-2017-16086 found in ua-parser.js HOT 2
- ua-parser-js to fix Regular Expression Denial Of Service (ReDoS) HOT 1
- areEqual doesn't support objects with null prototypes
- Got error "Cannot destructure property 'instrument' of 'options' as it is undefined" when using with jest:27.0.4 HOT 2
- missing v3.0.0 relase and tag HOT 1
- ua-parser-js Dependency Security vulnerability HOT 1
- 'instrument' required, then optional? Resulting in `TypeError: Cannot destructure property 'instrument' of 'options' as it is undefined.`
- fbjs > [email protected]: this package has been hijacked HOT 1
- [security-update] Update ua-parser-js dependency in fbjs HOT 1
- "ua-parser-js": "0.7.30" have a wrong HOT 3
- Security vulnerability with cross-fetch in fbjs HOT 3
- ChainAlert: new npm maintainer has published version 3.0.3 of package fbjs HOT 3
- Git.io deprecation notice
- upgrade core-js version HOT 1
- ua-parser-js ReDoS Vulnerability HOT 1
- nullthrows has either bad condition or bad error message HOT 1
- Analysis: 100% of dependency updates in this repository can be merged.
- Deprecated babel plugins HOT 1
- ua-parser-js changing to AGPL license in v2.x
- Consider removing `cross-fetch` dependency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fbjs.