Using flow 0.23 I get this error:
node_modules/fbjs/lib/Deferred.js.flow:56
56: Promise.prototype.done.apply(this._promise, arguments);
^^^^ property `done`. Property not found in
Promise. See lib: core.js:446
This is with fbjs 0.8
This isn't entirely surprising given what's in the changelog for 0.23 - https://github.com/facebook/flow/blob/master/Changelog.md
Summary:
var Promise require('./Promise')module.exports = require('promise');Promise.prorotype.done.It would appear that we don't actually follow that resolution though and are just always using the builtin definition. That would make sense in the polyfill case (which was covered in the changelog) but doesn't when it's really just a local variable shadowing the global.
@gabelevi - do you know what's up and the right way to make this work?
(side note: any solution to this will likely come in the fbjs repo but let's chat here for now)
I am still getting this error on 0.28. What can I do to fix it?
Make sure your Draft/fbjs deps are up to date, perhaps with npm update. The fbjs dep in Draft 0.7 was ^0.8.1 which should pick up the newer fbjs that has the fix. #517 will ensure that in a future version.
I just encountered this after adding react to an npm project with npm install --save react react-dom
node_modules/react/node_modules/fbjs/lib/Deferred.js.flow:60
60: Promise.prototype.done.apply(this._promise, arguments);
^^^^ property `done`. Property not found in
500: declare class Promise<+R> {
^ Promise. See lib: /private/tmp/flow/flowlib_384b88af/core.js:500
Versions of things:
flow: 0.30.0 react: 15.3.0react/node_modules/fbjs: 0.8.1I still have it with the same config as @robz.
I'm getting this too, for reference I'm not polyfilling anything... Is there a setting to ignore this error?
This pretty much prevents me from actually using flow
I updated my fbjs to 0.8.4, but still getting the warning.
Got this setting up flow on Windows 10 first time.
node_modules/fbjs/lib/Deferred.js.flow:60
60: Promise.prototype.done.apply(this._promise, arguments);
^^^^ property `done`. Property not found in
497: declare class Promise<+R> {
^ Promise. See lib: ../../../../local/msys64/tmp/flow/flowlib_21eb48a0/core.js:497
node_modules/fbjs/lib/shallowEqual.js.flow:29
29: return x !== 0 || 1 / (x: $FlowIssue) === 1 / (y: $FlowIssue);
^^^^^^^^^^ identifier `$FlowIssue`. Could not resolve name
@ChrisPenner adding these lines to .flowconfig fixes it for me, not sure if there are any side effects to this.
.*/node_modules/fbjs/lib/Deferred.js.flow
.*/node_modules/fbjs/lib/shallowEqual.js.flow
I was able to get around those issues by setting my .flowconfig to be:
[options]
suppress_type=$FlowIssue
[libs]
./node_modules/fbjs/flow/lib
We're working on fixing this from the fbjs side of things. Hopefully this won't be an issue much longer.
Hello @zpao any news on this?
Fixed it in [email protected] so should be good if you update deps.
Most helpful comment
I was able to get around those issues by setting my
.flowconfigto be: