-
-
Notifications
You must be signed in to change notification settings - Fork 208
Parsing error with polymorphic functions/generic type params #321
Comments
I've started running into this too and it definitely seems related to parsing of generic parameters. I don't think it's limited to functions either. It looks like it's also triggered by |
If it really just started to happen recently, then it might be a regression in babylon. In the latest release of babylon there was one change related to flow. |
I think it must be some pretty recent update somewhere that is causing it because I only started noticing it in the last couple days after doing fresh installs. This is with packages that are only a few weeks old and didn't trigger the error originally. I tried to install older versions of |
The recent change in babylon was babel/babylon#25 edit: which |
Just like @hzoo said. I confirmed that locking the |
Confirmed for me, |
Is there a simple workaround for this? |
current workaround is pinning to 6.8.0 like mentioned above |
Thanks a lot @hzoo ! Been struggling with this for a while. 6.8.0 sorted me out :) |
I kept getting an error in Travis from eslint: import-js/lib/findJsModulesFor.js 0:0 error Parsing error: Object.defineProperty called on non-object Initially, I wasn't getting this error locally. But after wiping node_modules and reinstalling, I saw it there too. After some googling, I came across this recent babel-eslint issue: babel/babel-eslint#321 In that thread, people suggest pinning babylon at 6.8.0 (a regression was introduced in 6.8.1). We don't depend on that directly, but pinning babel related dependencies to 6.8.0 seemed to do the trick.
I kept getting an error in Travis from eslint: import-js/lib/findJsModulesFor.js 0:0 error Parsing error: Object.defineProperty called on non-object Initially, I wasn't getting this error locally. But after wiping node_modules and reinstalling, I saw it there too. After some googling, I came across this recent babel-eslint issue: babel/babel-eslint#321 In that thread, people suggest pinning babylon at 6.8.0 (a regression was introduced in 6.8.1). Doing that seems to do the trick.
I kept getting an error in Travis from eslint: import-js/lib/findJsModulesFor.js 0:0 error Parsing error: Object.defineProperty called on non-object Initially, I wasn't getting this error locally. But after wiping node_modules and reinstalling, I saw it there too. After some googling, I came across this recent babel-eslint issue: babel/babel-eslint#321 In that thread, people suggest pinning babylon at 6.8.0 (a regression was introduced in 6.8.1). Doing that seems to do the trick.
See discussion at babel/babel-eslint#321 We'll need to un-shrinkwrap in the future once the bug is fixed Signed-off-by: Michelle Tilley <binarymuse@github.com>
See discussion at babel/babel-eslint#321 We'll need to un-shrinkwrap in the future once the bug is fixed Signed-off-by: Michelle Tilley <binarymuse@github.com>
Hi, I'm getting this issue at the moment. I don't really know what I'm doing with npm. Can some tell me how to pin babylon? I tried just |
Just "npm rm babylon" and then "npm install babylon@6.8.0 --save[-dev] --save-exact". Did the trick for me. |
… annotations until the bug here is fixed babel/babel-eslint#321
Ok thanks to @danez this should be fixed in babel 6.10.2 (babel-eslint uses babel-types, etc), so will need to |
The tests still fail. I think because the new TypeParameter is not visited/marked as seen. |
This used to work fine, but after a fresh install I've started getting this error. I haven't been able to narrow down exactly which module upgraded recently. This is potentially related to #266. I'm also unsure if the problem is with babel-eslint.
I'm using Babel, flow, and babel-eslint. Flow doesn't complain with the below, but eslint does:
The text was updated successfully, but these errors were encountered: