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

Failed to resolve import source when using PNPM #10121

Closed
ocavue opened this issue Jan 15, 2024 · 1 comment
Closed

Failed to resolve import source when using PNPM #10121

ocavue opened this issue Jan 15, 2024 · 1 comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: sfc

Comments

@ocavue
Copy link

ocavue commented Jan 15, 2024

Vue version

3.4.14

Link to minimal reproduction

https://github.com/issueset/vue-sfc-pnpm-issue

Steps to reproduce

Open the following three links. They are the same minimal repo with different package managers.

npm and yarn work fine, but pnpm throws the following error.

✓ 3 modules transformed.
[vite:vue] [@vue/compiler-sfc] Failed to resolve import source "@prosekit/vue".

/home/projects/nbwijjbqo.github/node_modules/prosekit/dist/_tsup-dts-rollup.d.ts
1  |  import { addMark } from '@prosekit/core';
2  |  import { AddMarkStep } from '@prosekit/pm/transform';
   |                                        ^^^^^^^^^^^^^^^^
3  |  import { AddNodeMarkStep } from '@prosekit/pm/transform';
4  |  import { AllSelection } from '@prosekit/pm/state';
file: /home/projects/nbwijjbqo.github/src/comp.vue
error during build:
Error: [@vue/compiler-sfc] Failed to resolve import source "@prosekit/vue".

It seems that the build would be fine if I remove the defineProps<VueNodeViewProps> in src/comp.vue.

While this could be a bug on the pnpm, this error is thrown by @vue/compiler-sfc, so I am submitting the issue here so that maybe the Vue team could check it out and give some more information.

(I don't have a link for bun because I cannot get bun installed in stackblitz. However, when I test bun locally, it works fine too).

What is expected?

No error

What is actually happening?

[vite:vue] [@vue/compiler-sfc] Failed to resolve import source "@prosekit/vue".

System Info

System:
    OS: macOS 14.2.1
    CPU: (8) arm64 Apple M2
    Memory: 107.95 MB / 24.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.17.1 - /opt/homebrew/opt/node@18/bin/node
    Yarn: 1.22.19 - /opt/homebrew/opt/node@18/bin/yarn
    npm: 9.6.7 - /opt/homebrew/opt/node@18/bin/npm
    pnpm: 8.9.2 - /opt/homebrew/opt/node@18/bin/pnpm
    bun: 1.0.4 - ~/.bun/bin/bun
  Browsers:
    Chrome: 120.0.6099.216
    Chrome Canary: 122.0.6249.0
    Safari: 17.2.1
    Safari Technology Preview: 17.4
  npmPackages:
    vue: 3.4.14 => 3.4.14

Any additional comments?

No response

@yyx990803 yyx990803 added scope: sfc 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Jan 18, 2024
@ocavue
Copy link
Author

ocavue commented Jan 19, 2024

Thanks! I can confirm that Vue 3.4.15 fixes the issue.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: sfc
Projects
None yet
Development

No branches or pull requests

2 participants