question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

import/named and import/namespace errors after upgrading Babel

See original GitHub issue

I was on @babel/core 7.8.x and upgraded to 7.10.x and suddenly started seeing errors for import/named and import/namespace.

I have something similar to:

./alpha/abc.js

export const A = 'A'
export const B = 'B'
export const C = 'C'

./alpha/def.js

export const D = 'D'
export const E = 'E'
export const F = 'F'

./alpha/index.js

export * as abc from './abc'
export * as def from './def'

And then in files that need it:

import * as alpha from 'path/to/alpha/index.js'

// do stuff with alpha.abc and alpha.def

I have babel-eslint and @babel/plugin-proposal-export-namespace-from installed. I’m on the latest eslint-plugin-import. Any thoughts?

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
VladimirPalcommented, Dec 25, 2020

Hi! Same issue 😦

"@babel/core": "7.12.10",
"@babel/eslint-parser": "7.12.1",
"@babel/plugin-proposal-export-namespace-from": "7.12.1",

"eslint": "7.16.0",
"eslint-plugin-import": "2.22.1",

In the file where import ns - import/named: ns not found in module

export * as ns from 'mod';
nvim
1reaction
eliw00dcommented, Jul 7, 2020

I was able to get a minimum repro of the issue here. I hope that helps!

Read more comments on GitHub >

github_iconTop Results From Across the Web

import/named and import/namespace errors after ...
I was on @babel/core 7.8.x and upgraded to 7.10.x and suddenly started seeing errors for import/named and import/namespace.
Read more >
Import error with Gulp and Babel when upgrading to ES2017
I have ES6 gulp modules for automation in my project. Within them there are JS features you would expect such as imports. In...
Read more >
eslint-plugin-import
Ensure all imports appear before other statements ( first ) · Ensure all exports appear after other statements ( exports-last ) · Report...
Read more >
parsing error: cannot find module 'babel-eslint'
When I opened VSCode only in the front folder this error faded away. I guess a solution would be to make a shared...
Read more >
eslint-plugin-import
... amd: true}] import/named: 2 import/namespace: 2 import/default: 2 ... no-extraneous-dependencies /TypeScript: do not error when importing type from dev ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found