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

Closed
1 task
shalldie opened this issue Mar 19, 2024 · 2 comments · Fixed by #173
Closed
1 task

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

shalldie opened this issue Mar 19, 2024 · 2 comments · Fixed by #173
Assignees
Labels
bug Something isn't working

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 🥇
@IanVS
Copy link
Owner

IanVS commented Jun 26, 2024

@shalldie I've released version 4.3.0 which fixes the bug you reported here. Please try it out and let me know if it's working correctly for you now. And thanks for the report with the reproduction, that was very helpful!

@shalldie
Copy link
Author

shalldie commented Jul 3, 2024

@shalldie I've released version 4.3.0 which fixes the bug you reported here. Please try it out and let me know if it's working correctly for you now. And thanks for the report with the reproduction, that was very helpful!

4.3.0 does a good work !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants