Vue3 - Can't import the named export from nonEcmaScript module - error in node modules

197 Views Asked by At

I have the following error when I try to run Vue3 app, created with vue-cli:

ecmascript module error I've tried this solutions https://github.com/vuejs/pinia/issues/675 and Can't import the named export XXXX from non EcmaScript module (only default export is available) but it changed nothing. Any ideas? There is my package.json:

{
  "name": "frontend",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "lint-no-mercy": "vue-cli-service lint --max-warnings 0"
  },
  "dependencies": {
    "@popperjs/core": "^2.9.2",
    "@vueform/multiselect": "^1.5.0",
    "axios": "^0.21.1",
    "bootstrap": "^5.0.1",
    "bootstrap-icons": "^1.5.0",
    "core-js": "^3.6.5",
    "dayjs": "^1.10.6",
    "jwt-decode": "^3.1.2",
    "v-calendar": "^3.0.0-alpha.5",
    "vue": "^3.0.0",
    "vue-axios": "^3.2.4",
    "vue-router": "^4.0.8",
    "vuex": "^4.0.1",
    "vuex-persistedstate": "^4.0.0-beta.3"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "~4.5.0",
    "@vue/cli-plugin-eslint": "~4.5.0",
    "@vue/cli-service": "~4.5.0",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-airbnb": "^5.0.2",
    "babel-eslint": "^10.1.0",
    "eslint": "^6.7.2",
    "eslint-plugin-import": "^2.20.2",
    "eslint-plugin-vue": "^7.0.0"
  }
}

and vue.config

module.exports = {
  publicPath: process.env.VUE_PUBLIC_PATH,
  chainWebpack: (config) => {
    config.module
      .rule('pdf')
      .test(/\.pdf$/)
      .use('file-loader')
      .loader('file-loader');
  },
};
0

There are 0 best solutions below