Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: decode_js.EntityDecoder is not a constructor #10148

Closed
hatai opened this issue Jan 18, 2024 · 6 comments
Closed

TypeError: decode_js.EntityDecoder is not a constructor #10148

hatai opened this issue Jan 18, 2024 · 6 comments
Labels
need more info Further information is requested

Comments

@hatai
Copy link

hatai commented Jan 18, 2024

Vue version

3.4.14

Link to minimal reproduction

https://stackblitz.com/edit/vitejs-vite-5fafk2?file=package.json

Steps to reproduce

i upgrade vue.js version from 3.4.13 to 3.4.14 and then i run yarn workspace vue3 run dev.
but TypeError: decode_js.EntityDecoder is not a constructor is occurred.

so i downgrade vue.js version from v3.4.14 to v3.4.13, error is gone

i think vue.js v3.4.14 is something wrong

What is expected?

no errors should occur

What is actually happening?

❯ yarn workspace vue3 run dev

yarn workspace v1.22.21
yarn run v1.22.21
$ vite
failed to load config from /Users/taigenhamada/Projects/icare/www/app/frontend/vite.config.ts
error when starting dev server:
TypeError: decode_js.EntityDecoder is not a constructor
    at new Tokenizer (/Users/taigenhamada/Projects/icare/www/node_modules/@vitejs/plugin-vue/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:453:28)
    at Object.<anonymous> (/Users/taigenhamada/Projects/icare/www/node_modules/@vitejs/plugin-vue/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js:2128:19)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
    at Module.load (node:internal/modules/cjs/loader:1197:32)
    at Module._load (node:internal/modules/cjs/loader:1013:12)
    at Module.require (node:internal/modules/cjs/loader:1225:19)
    at require (node:internal/modules/helpers:177:18)
    at Object.<anonymous> (/Users/taigenhamada/Projects/icare/www/node_modules/@vitejs/plugin-vue/node_modules/@vue/compiler-core/index.js:6:20)
    at Module._compile (node:internal/modules/cjs/loader:1356:14)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /Users/taigenhamada/.asdf/installs/nodejs/18.19.0/bin/node
Arguments: /Users/taigenhamada/.asdf/installs/nodejs/18.19.0/lib/node_modules/yarn/lib/cli.js run dev
Directory: /Users/taigenhamada/Projects/icare/www/app/frontend
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.

System Info

System:
    OS: macOS 13.6.3
    CPU: (8) arm64 Apple M1 Pro
    Memory: 48.80 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.19.0 - ~/.asdf/installs/nodejs/18.19.0/bin/node
    Yarn: 1.22.21 - ~/.asdf/installs/nodejs/18.19.0/bin/yarn
    npm: 10.2.3 - ~/.asdf/plugins/nodejs/shims/npm
    bun: 1.0.5 - ~/.asdf/shims/bun
  Browsers:
    Chrome: 120.0.6099.216
    Safari: 17.2.1
  npmPackages:
    vue: 3.4.14 => 3.4.14

Any additional comments?

No response

@Doctor-wu
Copy link
Member

It seems no error occurred in your reproduction, did you paste the wrong link?

@Doctor-wu
Copy link
Member

Maybe you can provide a minimal reproduction by sfc-playground

@michaelts1
Copy link

I am also receiving the "decode_js.EntityDecoder is not a constructor" error. However in my case, I am also using @vue/compat, and the error only occurs when I upgrade @vue/compat to version 3.4.x (3.4.0-3.4.14 all cause this error). When using vue 3.4.14 and @vue/compat 3.3.13", I am not getting any error. After upgrading @vue/compat, this error occurs.

Unfortunately I can't create a minimal reproduction, but my full error stack trace is:

> npx vite
ERROR  failed to load config from <project folder>\vite.config.js

ERROR  error when starting dev server:
TypeError: decode_js.EntityDecoder is not a constructor
    at new Tokenizer (<project folder>\node_modules\@vue\compat\dist\vue.cjs.js:13552:28)
    at Object.<anonymous> (<project folder>\node_modules\@vue\compat\dist\vue.cjs.js:15044:19)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (<project folder>\node_modules\@vue\compat\index.js:6:20)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)

System info:

  System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1355U
    Memory: 5.53 GB / 15.66 GB
  Binaries:
    Node: 20.10.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.3 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (119.0.2151.93)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    vue: ^3.4.14 => 3.4.14

@yyx990803
Copy link
Member

Your reproduction doesn't show the error described. A proper reproduction is needed.

@yyx990803 yyx990803 added the need more info Further information is requested label Jan 18, 2024
@SidselQImer
Copy link

I get the same error.
But it doesn't help to downgrade the vue and vue/compat version.
I only have issues when i try to update my vue router from 3 to 4.

here is the installed version:
"@vue/compat": "^3.3.13",
"vue": "^3.3.13",

but the compat version it has downloaded is 3.4.14

billede

@yyx990803
Copy link
Member

Closing as stale due to lack of information to follow up on. Please open a new issue if a reproduction can be provided.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants