experiments.optimize.bundle: true -- ENOENT: no such file or directory, unlink /home/p/projects/csa-react/build/build/__snowpack__/env.js #2039
Unanswered
pschyska
asked this question in
Troubleshooting
Replies: 1 comment 1 reply
-
I can also say that this started happening to me. Thanks for figuring out it was the esbuild version, I went back a version and that resolved the problem. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey,
I was using
experiments.optimize.bundle: true
successfully in a lit-element project (from the csa-lit-element-ts template).Trying the same with the csa-preact-typescript or csa-react-typescript templates, I'm getting the following error:
ENOENT: no such file or directory, unlink '<snip...>projects/csa-react/build/build/__snowpack__/env.js'
Note the build/build part, which doesn't exist.
Command and output:
My project:
npx create-snowpack-app csa-react --template @snowpack/app-template-react-typescript --use-pnpm
. Then added optimize to snowpack.config.js:Random versions:
(Unsurprisingly the issue goes away when I set
bundle: false
, because there are no unbundled files to remove then)This only happens with esbuild 0.8.24, and not 0.8.23. The output format of esbuild's manifest is different:
(the + version is 0.8.24, the other is 0.8.23).
snowpack adds the extraneous build/ prefix here
And so we end up with
build/build
.I think it's a bug /cc @FredKSchott , snowpack should probably handle that case
Beta Was this translation helpful? Give feedback.
All reactions