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

fix: Build fails when outDir (other than the default) does not exist #126

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

thejackshelton
Copy link
Member

@thejackshelton thejackshelton commented Jun 9, 2024

fixes #74

Copy link

changeset-bot bot commented Jun 9, 2024

⚠️ No Changeset found

Latest commit: 4db3e69

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

Copy link

pkg-pr-new bot commented Jun 9, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@qwikdev/create-astro (4db3e69)

npm i https://pkg.pr.new/QwikDev/astro/@qwikdev/create-astro@126

@qwikdev/astro (4db3e69)

npm i https://pkg.pr.new/QwikDev/astro/@qwikdev/astro@126

@thejackshelton thejackshelton marked this pull request as draft June 9, 2024 19:58
@thejackshelton
Copy link
Member Author

I have been using the latest pkg pr new url's in the action to debug this in a consumer project.

image

we can get the build and dev mode working, but preview will fail with the following error:

> serve
> node ./dist/server/entry.mjs

node:internal/modules/cjs/loader:1146
  throw err;
  ^

Error: Cannot find module '/Users/jackshelton/dev/playground/test-outdir/dist/server/entry.mjs'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1143:15)
    at Module._load (node:internal/modules/cjs/loader:984:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
    at node:internal/main/run_main_module:28:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v20.12.2

It also creates a folder named dist inside of our custom outDir, which doesn't make any sense.

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.

Build fails when outDir (other than the default) does not exist
1 participant