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.

On v15 all imports are erroring.

See original GitHub issue

Hello there. I’m trying to update to v15 of airbnb base. However, upon doing so all of our imports are throwing Cannot use import declarations in modules that export using CommonJS (module.exports = 'foo' or exports.bar = 'hi') import/no-import-module-exports I haven’t found anything about what is wrong in my code. If I could get some insight into what I’m doing wrong that would be greatly appreciated. Here is some info.

.eslintrc.json

{
    "env": {
        "es2021": true,
        "node": true
    },
    "extends": ["airbnb-base", "prettier"],
    "parserOptions": {
        "ecmaVersion": 12,
        "sourceType": "module"
    },
    "rules": {
        "no-console": "off",
        "no-param-reassign": "off",
        "no-restricted-syntax": "off"
    }
}

Eslint version ^8.2.0

A screenshot of the error image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7

github_iconTop GitHub Comments

3reactions
hasnaindevcommented, Feb 20, 2022

@ljharb Was this issue resolved? I’m using WebPack along with HMR where WebPack provides a “module” variable. I looked at your comment and removed this line from code and the error vanished.

if (module && module.hot) module.hot.accept();

I took me several hours to get here and realize what exactly the issue was. I’m using the latest packages and the issue is still there. Thank you!

2reactions
ljharbcommented, Feb 20, 2022

@hasnaindev if it’s still there in v2.25.3 or later of the import plugin, please file a new issue there.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio displaying errors even if projects build
I have a problem with Visual Studio on a C# solution. It displays totally random errors, but the projects build. Right now, I...
Read more >
Error Contract Import v15.4
We have a contract import (Customer Contracts) that works well in 15.2. We have now upgraded our UAT to 15.4, and have an...
Read more >
FM Crashes During Large Import (Over the Limit)??
If I try to import all data as-is as once large CSV file, it crashes at different places each time on all computers....
Read more >
Native XML import hangs
I'm using EA v15.2.1558 and wanted to copy a data model from one repository to another. The data model has about 400 Classes, ......
Read more >
Angular v15—She's Here!
Angular v15—She's Here! AlyssaNicoll ... And HAPPY ANGULAR VERSION 15 to all! ... Then we can import it into our standalone card component:....
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