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.

Getting warnings for `export 'default' (imported as 'mod') was not found`

See original GitHub issue

Version

15.9.3

Reproduction link

https://github.com/amir20/dozzle/tree/webpack5

Steps to reproduce

git clone https://github.com/amir20/dozzle/tree/webpack5 yarn yarn build

What is expected?

No warnings

What is actually happening?

I am getting a lot of warnings that look like

WARNING in ./assets/components/SideMenu.vue?vue&type=style&index=0&id=59920051&scoped=true&lang=scss& 1:495-498
export 'default' (imported as 'mod') was not found in '-!../../node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-1[0].rules[0].use[0]!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??clonedRuleSet-1[0].rules[0].use[2]!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SideMenu.vue?vue&type=style&index=0&id=59920051&scoped=true&lang=scss&' (possible exports: )
 @ ./assets/components/SideMenu.vue 4:0-93
 @ ./node_modules/vue-loader/lib/index.js??vue-loader-options!./assets/App.vue?vue&type=script&lang=js& 46:0-45 55:4-12
 @ ./assets/App.vue?vue&type=script&lang=js& 1:0-115 1:131-134 1:136-248 1:136-248
 @ ./assets/App.vue 2:0-55 3:0-50 3:0-50 10:2-8
 @ ./assets/main.js 8:0-28 59:19-22

WARNING in ./assets/pages/Index.vue?vue&type=style&index=0&id=ee5d2aae&lang=scss&scoped=true& 1:492-495
export 'default' (imported as 'mod') was not found in '-!../../node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-1[0].rules[0].use[0]!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??clonedRuleSet-1[0].rules[0].use[2]!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Index.vue?vue&type=style&index=0&id=ee5d2aae&lang=scss&scoped=true&' (possible exports: )
 @ ./assets/pages/Index.vue 4:0-90
 @ ./assets/pages/index.js 1:0-47 1:0-47
 @ ./assets/main.js 9:0-92 19:15-20 24:15-24 30:15-32 35:15-23 40:15-19 45:15-27

WARNING in ./assets/pages/Settings.vue?vue&type=style&index=0&id=8dc7fec8&lang=scss&scoped=true& 1:495-498
export 'default' (imported as 'mod') was not found in '-!../../node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-1[0].rules[0].use[0]!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??clonedRuleSet-1[0].rules[0].use[2]!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Settings.vue?vue&type=style&index=0&id=8dc7fec8&lang=scss&scoped=true&' (possible exports: )
 @ ./assets/pages/Settings.vue 4:0-93
 @ ./assets/pages/index.js 5:0-53 5:0-53
 @ ./assets/main.js 9:0-92 19:15-20 24:15-24 30:15-32 35:15-23 40:15-19 45:15-27

I created this issue at https://github.com/webpack-contrib/mini-css-extract-plugin/issues/625 but suggestion was to do it here instead

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:26
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

106reactions
dineugcommented, Oct 23, 2020

I have the same problem. I looked it up. There was an esModule in mini-css-extract-plugin v1.0.0 I solved it with this.

{
  loader: MiniCssExtractPlugin.loader,
  options: {
    esModule: false,
  },
}
5reactions
emgyrzcommented, Nov 25, 2020

In my case, the replacement of imports helped

//  from
import * as ST from './styles.scss

// to
import ST from './styles.scss

and without

options: {
  esModule: false,
},
Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt export 'default' (imported as 'mod') was not found
When I compile the project with Nuxt, it throws me export 'default' (imported as 'mod') was not found error. Please help! javascript ·...
Read more >
Vue export 'default' (imported as 'mod') was not found
i'm using vue with typescript. this is my ts-config.json { "compilerOptions": { "target": "esnext", "module": "esnext" ...
Read more >
WARN export 'default' (imported as 'content') was not found
Hello Friends , today while I was setting up a new React project from scratch without using create-react-app and after doing all the...
Read more >
Nuxt export 'default' (imported as 'mod') was not found-Vue.js
You will need atleast an empty export default script in your vue files to not see this error. If you don't have any...
Read more >
export - JavaScript - MDN Web Docs
Exported values can then be imported into other programs with the ... the current module, but the default export of mod is not...
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