-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read property 'namespace' of undefined #416
Comments
Are you running 1.10.1? I think I totally botched the publish and accidentally packaged the build products for v2. |
@benmosher Yes I am |
Just published 1.10.2, can you try it? |
Thanks. Just tried, the error persists.
|
Hmm, tough to say without more info. Looks like a legitimate bug. Can you isolate to specific lines of code and post them? |
Might reside here but I'm not sure. Let me know. |
Hmm, if any of them, probably one of these import * as ReactMDL from 'react-mdl';
let Navigation = ReactMDL.Navigation;
let Drawer = ReactMDL.Drawer;
let Layout = ReactMDL.Layout;
let Content = ReactMDL.Content;
let Header = ReactMDL.Content; Can you try commenting them and see if it goes away? |
You're correct. The error is gone. Thanks. What I should use instead? const? |
It's definitely a bug in the rule. It shouldn't do anything in these lines, much less throw an exception. I will try to fix ASAP. In the meantime, import {
Navigation,
Drawer,
Layout,
Content,
Header,
} from 'react-mdl' is roughly equivalent, and hopefully doesn't throw any errors. 😳 |
Thanks bro. |
PS: I got these errors, not entirely sure if they're related, but the imports are working though.
|
Probably are related. Thanks! |
Did some digging. Turns out it's because the ES6 behind Not sure how to resolve. I probably need to handle somehow in the plugin, short-term. You can use these settings in your {
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: { experimentalObjectRestSpread: true, jsx: true }
}
} |
@benmosher It did the trick. Thanks! |
This seems long since resolved. |
TypeError: Cannot read property 'namespace' of undefined from
eslint-plugin-import/lib/rules/namespace.js
Getting this error and not exactly sure why. Thanks.
The text was updated successfully, but these errors were encountered: