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

使用装饰器模式开发,报错: "decorators", "decorators-legacy". #34

Closed
5 tasks done
pyt111 opened this issue Jun 19, 2024 · 5 comments
Closed
5 tasks done

Comments

@pyt111
Copy link

pyt111 commented Jun 19, 2024

Describe the bug

[plugin:unplugin-turbo-console] This experimental syntax requires enabling one of the following parser plugin(s): "decorators", "decorators-legacy". (18:0)
image

image

Reproduction

https://stackblitz.com/edit/vitejs-vite-s1mfjm?file=src%2Fcomponents%2FHelloWorld.vue

System Info

System:
    OS: macOS 14.4.1
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
    Memory: 31.55 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.7.0 - /usr/local/bin/npm
    pnpm: 9.3.0 - ~/Library/pnpm/pnpm
  Browsers:
    Chrome: 126.0.6478.62
    Safari: 17.4.1
  npmPackages:
    @vitejs/plugin-vue: ^5.0.4 => 5.0.5 
    typescript: ^5.2.2 => 5.4.5 
    unplugin-turbo-console: ^1.8.6 => 1.8.6 
    vite: ^5.2.0 => 5.3.1 
    vue: ^3.4.21 => 3.4.29 
    vue-facing-decorator: ^3.0.4 => 3.0.4 
    vue-tsc: ^2.0.6 => 2.0.21

Used Package Manager

pnpm

Validations

  • Follow our Code of Conduct
  • Read the Contributing Guide.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.
Copy link

stackblitz bot commented Jun 19, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@pyt111 pyt111 changed the title 使用装饰器模式开发 使用装饰器模式开发,报错: "decorators", "decorators-legacy". Jun 19, 2024
@yuyinws
Copy link
Member

yuyinws commented Jun 19, 2024

It seems a bug from vue-facing-decorator.
I get the same error when remove unplugin-turbo-console.

image image

@pyt111
Copy link
Author

pyt111 commented Jun 19, 2024

It seems a bug from vue-facing-decorator. I get the same error when remove unplugin-turbo-console.

image image

关掉 unplugin-turbo-console后,是vue/compiler-sfc报错了,这个案例中没有配置
看这个新的案例:
(https://stackblitz.com/~/github.com/pyt111/my-vue-test-decorators)

@yuyinws
Copy link
Member

yuyinws commented Jun 19, 2024

那就说明这个错误与unplugin-turbo-console无关,似乎应该提给vue-facing-decorator

@pyt111
Copy link
Author

pyt111 commented Jun 20, 2024

那就说明这个错误与unplugin-turbo-console无关,似乎应该提给vue-facing-decorator

卸载vue-facing-decorator 使用vue-class-component,同样会有问题。只要使用装饰器就会抛出错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants