Skip to content

Module parse failed: Unexpected token (2716:59) #952

@Exlord

Description

@Exlord

Reporting a bug?

Hi, Can't run yarn serve after yarn upgrade

Vue3 + webpack

 ERROR  Failed to compile with 1 error                                             9:25:01 AM

 error  in ./node_modules/vue-i18n/dist/vue-i18n.esm-bundler.js

Module parse failed: Unexpected token (2716:59)
You may need an appropriate loader to handle this file type, currently no loaders are configu
red to process this file. See https://webpack.js.org/concepts#loaders
|     onBeforeMount(() => {
|         // eslint-disable-next-line @typescript-eslint/no-explicit-any
>         const composer = (_composer.value = instance.proxy?.$i18n
|             .__composer);
|         if (scope === 'global') {

 @ ./src/services/client.ts 7:0-35 22:6-13
 @ ./src/main.ts
 @ multi (webpack)-dev-server/client?http://localhost:8080&sockPath=/sockjs-node (webpack)/ho
t/dev-server.js ./src/main.ts

package.json

{
  "version": "0.1.26",

  "dependencies": {
    "@back/room-sdk": "^1.0.114",
    "@dafcoe/vue-collapsible-panel": "^0.2.0",
    "@popperjs/core": "^2.9.2",
    "@sentry/tracing": "^6.16.1",
    "@sentry/vue": "^6.16.1",
    "@tailwindcss/postcss7-compat": "yarn:@tailwindcss/postcss7-compat",
    "@tailwindcss/typography": "^0.4.0",
    "@types/lodash.debounce": "^4.0.6",
    "@types/lodash.throttle": "^4.1.6",
    "@types/resize-observer-browser": "^0.1.6",
    "@types/ua-parser-js": "^0.7.36",
    "@types/video.js": "^7.3.28",
    "autoprefixer": "9",
    "axios": "^0.25.0",
    "babel-loader": "^8.2.2",
    "core-js": "^3.6.5",
    "debug": "^4.3.3",
    "file-saver": "^2.0.5",
    "hark": "^1.2.3",
    "joi": "^17.6.0",
    "jszip": "^3.7.1",
    "lodash.debounce": "^4.0.8",
    "lodash.throttle": "^4.1.1",
    "mitt": "^3.0.0",
    "nosleep.js": "^0.12.0",
    "perfect-scrollbar": "^1.5.5",
    "postcss": "7",
    "register-service-worker": "^1.7.1",
    "tailwindcss": "yarn:@tailwindcss/postcss7-compat",
    "tailwindcss-rtl": "^0.7.3",
    "ua-parser-js": "^1.0.2",
    "video.js": "^7.17.0",
    "vue": "3.x",
    "vue-demi": "^0.11.4",
    "vue-i18n": "^9.2.0-beta.31",
    "vue3-carousel": "^0.1.36",
    "vue3-popper": "^1.4.1",
    "vuedraggable": "^4.1.0",
    "vuex": "^4.0.2"
  },
  "devDependencies": {
    "@types/cypress-cucumber-preprocessor": "^4.0.0",
    "@types/file-saver": "^2.0.2",
    "@types/jest": "^24.0.19",
    "@types/node": "^14.14.27",
    "@types/webpack-env": "^1.16.0",
    "@typescript-eslint/eslint-plugin": "^2.33.0",
    "@typescript-eslint/parser": "^2.33.0",
    "@vue/cli-plugin-babel": "~4.5.15",
    "@vue/cli-plugin-e2e-cypress": "~4.5.15",
    "@vue/cli-plugin-eslint": "~4.5.15",
    "@vue/cli-plugin-pwa": "~4.5.15",
    "@vue/cli-plugin-router": "~4.5.15",
    "@vue/cli-plugin-typescript": "~4.5.15",
    "@vue/cli-plugin-unit-jest": "~4.5.15",
    "@vue/cli-plugin-vuex": "~4.5.15",
    "@vue/cli-service": "~4.5.15",
    "@vue/compiler-sfc": "^3.0.0",
    "@vue/eslint-config-airbnb": "^5.0.2",
    "@vue/eslint-config-prettier": "^6.0.0",
    "@vue/eslint-config-typescript": "^5.0.2",
    "@vue/test-utils": "^2.0.0-0",
    "auto-changelog": "^2.3.0",
    "cypress-cucumber-preprocessor": "^4.0.1",
    "eslint": "^6.7.2",
    "eslint-plugin-prettier": "^3.1.3",
    "eslint-plugin-vue": "^7.0.0-0",
    "git-branch-is": "^4.0.0",
    "husky": "^3.1.0",
    "jest-serializer-vue": "^2.0.2",
    "lint-staged": "^12.3.4",
    "node-sass": "6.x",
    "prettier": "^1.19.1",
    "sass-loader": "10.x",
    "typescript": "^4.4.4",
    "vue-jest": "^5.0.0-0",
    "webpack-bundle-analyzer": "^4.4.2"
  },

  "lint-staged": {
    "*.{ts,vue,js}": [
      "eslint --fix"
    ]
  },
}

Expected behavior

To be compiled and run without error

Reproduction

I have been updating this project for a white not sure can reproduce with the new installer.

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz
    Memory: 13.90 GB / 31.92 GB
  Binaries:
    Node: 16.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.4 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.3.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 98.0.4758.102
    Edge: Spartan (44.19041.1266.0), Chromium (99.0.1150.30)
    Internet Explorer: 11.0.19041.1202

Screenshot

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions