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

Circular dependencies breaks vite build #3312

Closed
6 tasks done
yongjun21 opened this issue May 8, 2021 · 0 comments · Fixed by #3353
Closed
6 tasks done

Circular dependencies breaks vite build #3312

yongjun21 opened this issue May 8, 2021 · 0 comments · Fixed by #3353
Labels
bug: upstream Bug in a dependency of Vite p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@yongjun21
Copy link

yongjun21 commented May 8, 2021

Describe the bug

My project generates a faulty build in Vite as it has protobufjs as one of its dependencies. It is a known issue in protobufjs/protobuf.js#1503 that is caused by circular dependencies which is not handled well by @rollup/plugin-commonjs.

A fix has since been merged in: rollup/plugins#658 and released in version https://github.com/rollup/plugins/releases/tag/commonjs-v19.0.0.

Bumping the @rollup/plugin-commonjs version to 19.0.0 should fix this.

Reproduction

No reproduction as this issue has already been raised in protobufjs and @rollup/plugin-commonjs repos and the solution provided.

System Info

Output of npx envinfo --system --npmPackages vite,@vitejs/plugin-vue --binaries --browsers:

System:
  OS: macOS 11.2.3
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 12.42 GB / 32.00 GB
  Shell: 5.8 - /bin/zsh
Binaries:
  Node: 14.15.4 - /usr/local/bin/node
  Yarn: 1.23.0-20210103.1434 - /usr/local/bin/yarn
  npm: 6.14.10 - /usr/local/bin/npm
Browsers:
  Chrome: 90.0.4430.93
  Edge: 90.0.818.56
  Firefox: 88.0.1
  Safari: 14.0.3
npmPackages:
  @vitejs/plugin-vue: ^1.1.5 => 1.2.2 
  vite: ^2.2.4 => 2.2.4 

Used package manager: yarn

Logs

Refer to protobufjs/protobuf.js#1503


Before submitting the issue, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Provide a description in this issue that describes the bug.
  • Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
  • Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
@nihalgonsalves nihalgonsalves added bug bug: upstream Bug in a dependency of Vite p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels May 11, 2021
patak-dev pushed a commit that referenced this issue May 11, 2021
- v18 added the `ignoreDynamicRequires` option as a breaking change. The earlier behaviour matched `true`, so I set it as the default (ref: rollup/plugins#819)
- v19 is a breaking change since it now requires Rollup 2.38.0, but we’re already on 2.38.5. (ref: rollup/plugins#658)
fi3ework pushed a commit to fi3ework/vite that referenced this issue May 22, 2021
- v18 added the `ignoreDynamicRequires` option as a breaking change. The earlier behaviour matched `true`, so I set it as the default (ref: rollup/plugins#819)
- v19 is a breaking change since it now requires Rollup 2.38.0, but we’re already on 2.38.5. (ref: rollup/plugins#658)
@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug: upstream Bug in a dependency of Vite p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants