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

Rollup fails to resolve @vue/reactivity with @vueuse/components v10 #2972

Closed
7 tasks done
wopian opened this issue Apr 14, 2023 · 1 comment
Closed
7 tasks done

Rollup fails to resolve @vue/reactivity with @vueuse/components v10 #2972

wopian opened this issue Apr 14, 2023 · 1 comment

Comments

@wopian
Copy link

wopian commented Apr 14, 2023

Describe the bug

After upgrading to version 10 of @vueue/components, builds of our vue3 vite app fail because Rollup cannot find the @vue/reactivity import in @vueuse/components/index.mjs

This bug appears to have been introduced via f87f877 which adds the import on @vue/reactivity without declaring it as a peer dependency.

Error log
[vite]: Rollup failed to resolve import "@vue/reactivity" from "[system path]/node_modules/@vueuse/components/index.mjs".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
error during build:
Error: [vite]: Rollup failed to resolve import "@vue/reactivity" from "[system path]/node_modules/@vueuse/components/index.mjs".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at onRollupWarning (file:///[system path]/node_modules/vite/dist/node/chunks/dep-79892de8.js:46368:19)
    at onwarn (file:///[system path]/node_modules/vite/dist/node/chunks/dep-79892de8.js:46138:13)
    at Object.onwarn (file:///[system path]/node_modules/rollup/dist/es/shared/node-entry.js:25149:13)
    at ModuleLoader.handleInvalidResolvedId (file:///[system path]/node_modules/rollup/dist/es/shared/node-entry.js:23784:26)
    at file:///[system path]node_modules/rollup/dist/es/shared/node-entry.js:23744:26
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction

https://github.com/wopian/vueuse-repro2

Reproduction Steps

  1. Have Yarn installed on system
  2. Run yarn to install dependencies with Yarn 3.5.0
  3. Run yarn build to build the Vite 4 app

System Info

System:
    OS: macOS 13.3
    CPU: (8) arm64 Apple M1
    Memory: 99.84 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 19.9.0 - /opt/homebrew/bin/node
    Yarn: 3.5.0 - /opt/homebrew/bin/yarn
    npm: 9.6.3 - /opt/homebrew/bin/npm

Used Package Manager

yarn

Validations

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

1 participant