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

Formatting Vue SFC files error with @vue/compiler-sfc@2.7.16 #162

Open
1 task
shalldie opened this issue Mar 19, 2024 · 0 comments
Open
1 task

Formatting Vue SFC files error with @vue/compiler-sfc@2.7.16 #162

shalldie opened this issue Mar 19, 2024 · 0 comments
Assignees

Comments

@shalldie
Copy link

Your Environment

  • Prettier version: 3.2.5
  • node version: 20.11.1
  • package manager: [npm@7, pnpm@6, yarn@2] pnpm@8.15.4
  • IDE: [VScode, Webstorm, CLI] vscode

Describe the bug

An error appear with @vue/compiler-sfc@2.7.16,but works well with @vue/compiler-sfc@3.4.21

To Reproduce

I made a respository which can reproduce this.
https://github.com/shalldie/sort-import-err-in-compiler-sfc-2.7.16

And here's the steps (also in README.md):

Steps to reproduce

Case @vue/compiler-sfc@2.7.16

Now is @vue/compiler-sfc@2.7.16

  1. pnpm i
  2. format the file src/App.vue
  3. it shows error:
TypeError: Cannot read properties of undefined (reading 'match')

Case @vue/compiler-sfc@3.4.21

  1. Edit package.json to change the version to @vue/compiler-sfc@3.4.21
  2. run pnpm i
  3. format the file src/App.vue
  4. It works well.

Contribute to @ianvs/prettier-plugin-sort-imports

  • I'm willing to fix this bug 🥇
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