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

Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v72 to v73): The package "esbuild-linux-64" could not be found, and is needed by esbuild. #6592

Closed
swyxio opened this issue Sep 5, 2022 · 10 comments

Comments

@swyxio
Copy link
Contributor

swyxio commented Sep 5, 2022

Describe the bug

I updated @sveltejs/adapter-auto from 66 to 71 and my build went from working to failling:

sw-yx/swyxkit@8ffe753 (#100)

image

I then reverted versions from 71 all the way back down to 67 and 66 and the only working version was 66 (corresponding adapter netlify version is going from 72 (working) to 73 (not working).

it seems that when upgrading to those versions, a bunch of transitive esbuild linux dependencies get deleted and this is the cause of the error

image

Reproduction

swyxio/swyxkit#100 not a minimal repro but good enough to just look at the diffs. the last state is the working state

Logs

5:20:51 PM: $ npm run build
5:20:52 PM: npm WARN config tmp This setting is no longer used.  npm stores temporary files in a special
5:20:52 PM: npm WARN config location in the cache, and they are managed by
5:20:52 PM: npm WARN config     [`cacache`](http://npm.im/cacache).
5:20:52 PM: > [email protected] build
5:20:52 PM: > vite build
5:20:52 PM: failed to load config from /opt/build/repo/vite.config.js
5:20:52 PM: error during build:
5:20:52 PM: Error: The package "esbuild-linux-64" could not be found, and is needed by esbuild.
5:20:52 PM: If you are installing esbuild with npm, make sure that you don't specify the
"--no-optional" flag. The "optionalDependencies" package.json feature is used
5:20:52 PM: by esbuild to install the correct binary executable for your current platform.
5:20:52 PM:     at generateBinPath (/opt/build/repo/node_modules/vite/node_modules/esbuild/lib/main.js:1843:15)
5:20:52 PM:     at esbuildCommandAndArgs (/opt/build/repo/node_modules/vite/node_modules/esbuild/lib/main.js:1907:33)
5:20:52 PM:     at ensureServiceIsRunning (/opt/build/repo/node_modules/vite/node_modules/esbuild/lib/main.js:2072:25)
5:20:52 PM:     at build (/opt/build/repo/node_modules/vite/node_modules/esbuild/lib/main.js:1963:26)
5:20:52 PM:     at bundleConfigFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-665b0112.js:63328:26)
5:20:52 PM:     at loadConfigFromFile (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-665b0112.js:63304:31)
5:20:52 PM:     at resolveConfig (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-665b0112.js:62904:34)
5:20:52 PM:     at doBuild (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-665b0112.js:45581:26)
5:20:52 PM:     at build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-665b0112.js:45570:22)
5:20:52 PM:     at CAC.<anonymous> (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:748:15)
5:20:52 PM: ​
5:20:52 PM: ────────────────────────────────────────────────────────────────
5:20:52 PM:   "build.command" failed                                        
5:20:52 PM: ────────────────────────────────────────────────────────────────

System Info

System:
    OS: macOS 12.5.1
    CPU: (10) arm64 Apple M1 Max
    Memory: 483.80 MB / 32.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.15.0 - ~/Library/Caches/fnm_multishells/6604_1662411182834/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 8.5.5 - ~/Library/Caches/fnm_multishells/6604_1662411182834/bin/npm
  Browsers:
    Chrome: 104.0.5112.101
    Safari: 15.6.1
  npmPackages:
    @sveltejs/adapter-auto: ^1.0.0-next.71 => 1.0.0-next.71
    @sveltejs/kit: ^1.0.0-next.470 => 1.0.0-next.470
    svelte: ^3.50.0 => 3.50.0

Severity

blocking an upgrade

@swyxio
Copy link
Contributor Author

swyxio commented Sep 5, 2022

EDIT: i've updated the main issue with my findings

ok there doesnt seem to be anything in adapter-auto that wouldve broken it, so this is more likely an issue in adapter-netlify from 72 to 76

image

@swyxio swyxio changed the title Regression in @sveltejs/adapter-auto from v0.66 to v0.71 on Netlify Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v71 to v72) Sep 5, 2022
@Conduitry
Copy link
Member

https://github.com/sveltejs/kit/blob/master/packages/adapter-netlify/CHANGELOG.md#100-next72 The change in next.72 required a corresponding update of SvelteKit itself. Have you done this? During pre-release, there are frequent breaking changes to Kit and to the adapters that require you only use versions of Kit and the adapters that existed at the same time.

@swyxio swyxio changed the title Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v71 to v72) Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v72 to v73) Sep 5, 2022
@swyxio
Copy link
Contributor Author

swyxio commented Sep 5, 2022

yes i upgrade all deps at once when i do my periodic dep update. i am currently on "@sveltejs/kit": "^1.0.0-next.470" which i think is the latest

@swyxio
Copy link
Contributor Author

swyxio commented Sep 5, 2022

it seems that when upgrading from adapter netlify 72 to 73, a bunch of transitive esbuild linux dependencies get deleted and this is the cause of the error

image

@ShravanKumar-dev97

This comment was marked as off-topic.

@Rich-Harris
Copy link
Member

@ShravanKumar-dev97 this is unrelated, please don't hijack issues. open a new one with a full reproduction

@Rich-Harris Rich-Harris added the bug Something isn't working label Sep 6, 2022
@Rich-Harris Rich-Harris modified the milestones: 1.0, whenever Sep 6, 2022
@ShravanKumar-dev97
Copy link

@ShravanKumar-dev97 this is unrelated, please don't hijack issues. open a new one with a full reproduction

sorry, @Rich-Harris.
I am new to coding & svelte(learner), and I didn't know much about GitHub. sorry!

@benmccann
Copy link
Member

@sw-yx I can't reproduce this. I forked your repo, upgraded the dependencies, and successfully deployed it to Netlify. Is there something else I'm missing to reproduce this? You can see my fork here: https://github.com/benmccann/swyxkit

@swyxio
Copy link
Contributor Author

swyxio commented Sep 8, 2022

i have no idea. let me retry making a minimal repro...

@swyxio
Copy link
Contributor Author

swyxio commented Sep 8, 2022

yeah i cant replicate it. ugh.

gonna close it but i dont like that this bug is nondeterministic :/

@swyxio swyxio closed this as completed Sep 8, 2022
@swyxio swyxio changed the title Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v72 to v73) Regression in @sveltejs/adapter-auto from v0.66 to v0.67 on Netlify (adapter-netlify version from v72 to v73): The package "esbuild-linux-64" could not be found, and is needed by esbuild. Sep 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants