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

Build process fails with file copy when outDir is in upper directory #6431

Closed
1 task
impcyber opened this issue Mar 6, 2023 · 4 comments · Fixed by #6472
Closed
1 task

Build process fails with file copy when outDir is in upper directory #6431

impcyber opened this issue Mar 6, 2023 · 4 comments · Fixed by #6472
Assignees
Labels
- P3: minor bug An edge case that only affects very specific usage (priority)

Comments

@impcyber
Copy link
Contributor

impcyber commented Mar 6, 2023

What version of astro are you using?

2.0.17

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

pnpm

What operating system are you using?

Linux

Describe the Bug

export default defineConfig({
  outDir: '../build/retail',
});

If i set outDir in upper folder of project folder, then build process fails with copyfile error:
image

Link to Minimal Reproducible Example

https://codesandbox.io/p/sandbox/misty-silence-y7xnw7

Participation

  • I am willing to submit a pull request for this issue.
@matthewp
Copy link
Contributor

matthewp commented Mar 6, 2023

@bluwy I believe you looked into this issue in the past. Did we conclude that we couldn't support it?

@bluwy
Copy link
Member

bluwy commented Mar 7, 2023

This looks eerily familiar but I can't quite remember what was the problem. @impcyber I can't seem to get codesandbox working, there's some sort of yarn install error, but it might be me not familiar with codesandbox. Can you provide a GitHub repo or stackblitz instead?

I also tried replicating this locally and it's working fine for me.

@bluwy bluwy added the needs response Issue needs response from OP label Mar 7, 2023
@impcyber
Copy link
Contributor Author

impcyber commented Mar 7, 2023

@bluwy Something strange happens, but the example i have provided works well now...
But anyway here is an repo (part of my real project): https://github.com/impcyber/astro-test-outdir

git clone [email protected]:impcyber/astro-test-outdir.git
cd astro-test-outdir
pnpm i
pnpm build

I have tested it now, error present:

image

P.S: https://stackblitz.com/edit/github-5h7msy?file=app/astro.config.mjs
stackblitz example works well too

@bluwy bluwy self-assigned this Mar 8, 2023
@bluwy bluwy added - P3: minor bug An edge case that only affects very specific usage (priority) and removed needs response Issue needs response from OP labels Mar 8, 2023
@JerryWu1234
Copy link
Contributor

@bluwy.

let me dig into the build module again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- 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.

4 participants