Skip to content

Conversation

@JerryWu1234
Copy link
Contributor

After PR #8103 migrated from CJS to ESM, the execa package was marked as external in the esbuild config but was not declared as a dependency in create-qwik's package.json.

This caused 'Cannot find package execa' error when running: npx [email protected]

Fixes the runtime error by adding execa to dependencies.

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests / types / typos
  • Infra

Description

Checklist

  • My code follows the developer guidelines of this project
  • I performed a self-review of my own code
  • I added a changeset with pnpm change
  • I made corresponding changes to the Qwik docs
  • I added new tests to cover the fix / functionality

@JerryWu1234 JerryWu1234 requested a review from a team as a code owner December 9, 2025 08:25
@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2025

⚠️ No Changeset found

Latest commit: 28fcb8a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@JerryWu1234
Copy link
Contributor Author

image

Copy link
Member

@wmertens wmertens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only place execa is used is in https://github.com/QwikDev/qwik/blob/build/v2/packages/qwik/src/cli/utils/run-build-command.ts

I think the correct fix is to mark execa as noExternal for qwik/create-qwik so that it is tree shaken and less deps need to be installed before creating a new qwik app.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 9, 2025

Open in StackBlitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@8196
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@8196
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@8196
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@8196

commit: 28fcb8a

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2025

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 28fcb8a

@JerryWu1234
Copy link
Contributor Author

The only place execa is used is in https://github.com/QwikDev/qwik/blob/build/v2/packages/qwik/src/cli/utils/run-build-command.ts

I think the correct fix is to mark execa as noExternal for qwik/create-qwik so that it is tree shaken and less deps need to be installed before creating a new qwik app.

Due to the CJS dynamic require() in execa's dependency chain, it cannot be bundled into an ESM bundle.
The only solution is:
Keep execa in the external list (don't bundle it)
Declare it as a dependency in package.json
This way, npm/pnpm will automatically install execa and its dependencies when users install create-qwik.

@wmertens wmertens merged commit 4555a72 into QwikDev:build/v2 Dec 9, 2025
38 of 39 checks passed
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

Successfully merging this pull request may close these issues.

2 participants