kit: Bad publish in @sveltejs/adapter-auto@1.0.1 breaking all builds (Netlify Vercel etc)
Describe the bug
fyi @Rich-Harris - https://github.com/sveltejs/kit/pull/8522 broke adapter-netlify because the index.js stopped being published. see below
noticed my builds started failing 1hr after adapter-netlify 1.0.2 was published
adapter-auto gave this error:
then installing adapter-netlify gave this:
Reproduction
https://app.netlify.com/sites/swyxkit/deploys/63c33bd649e9cb0009b443fe
Logs
first
6:34:11 PM: found 0 vulnerabilities
6:34:11 PM: error during build:
6:34:11 PM: Error: Could not install @sveltejs/adapter-netlify. Please install it yourself by adding it to your package.json's devDependencies and try building your project again.
at get_adapter (file:///opt/build/repo/node_modules/@sveltejs/adapter-auto/index.js:87:11)
6:34:11 PM: at async adapt (file:///opt/build/repo/node_modules/@sveltejs/adapter-auto/index.js:112:19)
6:34:11 PM: at async adapt (file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/adapt/index.js:28:2)
6:34:11 PM: at async Object.handler (file:///opt/build/repo/node_modules/@sveltejs/kit/src/exports/vite/index.js:611:6)
6:34:11 PM: at async PluginDriver.hookParallel (file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:23322:17)
6:34:11 PM: at async Object.close (file:///opt/build/repo/node_modules/rollup/dist/es/shared/rollup.js:24674:13)
6:34:11 PM: at async Promise.all (index 0)
6:34:11 PM: at async build (file:///opt/build/repo/node_modules/vite/dist/node/chunks/dep-2285ba4f.js:45411:13)
6:34:11 PM: at async CAC.<anonymous> (file:///opt/build/repo/node_modules/vite/dist/node/cli.js:808:9)
then
6:37:40 PM:
6:37:40 PM: > Using @sveltejs/adapter-auto
6:37:40 PM: error during build:
6:37:40 PM: Error: Cannot find module '/opt/build/repo/node_modules/@sveltejs/adapter-netlify/index.js' imported from /opt/build/repo/x.js
6:37:40 PM: at new NodeError (file:///opt/build/repo/node_modules/import-meta-resolve/lib/errors.js:277:5)
6:37:40 PM: at finalizeResolution (file:///opt/build/repo/node_modules/import-meta-resolve/lib/resolve.js:267:11)
6:37:40 PM: at moduleResolve (file:///opt/build/repo/node_modules/import-meta-resolve/lib/resolve.js:1110:10)
6:37:40 PM: at defaultResolve (file:///opt/build/repo/node_modules/import-meta-resolve/lib/resolve.js:1248:15)
6:37:40 PM: at resolve (file:///opt/build/repo/node_modules/import-meta-resolve/index.js:30:12)
6:37:40 PM: at import_from_cwd (file:///opt/build/repo/node_modules/@sveltejs/adapter-auto/index.js:41:20)
6:37:40 PM: at get_adapter (file:///opt/build/repo/node_modules/@sveltejs/adapter-auto/index.js:60:18)
6:37:40 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/adapter-auto/index.js:112:25)
6:37:40 PM: at adapt (file:///opt/build/repo/node_modules/@sveltejs/kit/src/core/adapt/index.js:28:8)
6:37:40 PM: at Object.handler (file:///opt/build/repo/node_modules/@sveltejs/kit/src/exports/vite/index.js:611:12)
### System Info
```Shell
System:
OS: macOS 11.3.1
CPU: (8) x64 Apple M1
Memory: 65.08 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.18.1 - /var/folders/h_/1lq46tdj7jdbs0j1m5l6rlb00000gn/T/fnm_multishell_630_1673705335772/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 8.19.2 - /var/folders/h_/1lq46tdj7jdbs0j1m5l6rlb00000gn/T/fnm_multishell_630_1673705335772/bin/npm
Browsers:
Chrome: 109.0.5414.87
Firefox: 94.0.2
Safari: 14.1
npmPackages:
@sveltejs/adapter-auto: 1.0.0 => 1.0.0
@sveltejs/adapter-netlify: ^1.0.2 => 1.0.2
@sveltejs/kit: 1.0.1 => 1.0.1
svelte: ^3.55.0 => 3.55.0
vite: ^4.0.1 => 4.0.1
Severity
blocking all usage of SvelteKit
Additional Information
No response
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 13
- Comments: 21 (8 by maintainers)
Commits related to this issue
- chore: 📌 pin `@sveltejs/adapter-vercel@1.0.2` https://github.com/sveltejs/kit/issues/8530 — committed to importantimport/urara by kwaa a year ago
@k0d3r1s welcome to front-end development, where everything is held together by the heroic, usually unpaid efforts of OSS maintainers. Expect frustrating errors from time to time, and expect to be capable of searching, poking around, and being willing to figure out how to fix. If that’s too much for you, then this might not be the best career field for you.
Either way, showing up in GitHub threads talking shit like this is a great way to wear out your welcome, and ensure nobody will ever want to help you.
Ok this seems to work for me
kill your node_modules, and your lock file, and re-install, and that should hopefully work
excelent timing for starting to learn svelte to get a buggy adapter-node package with missing file, frustration is through the roof
i suspect this affects all the other adapters as well as i can see adapter-vercel has the same issue
@arackaf i expressed my thoughts. how is that talking shit? as this is an obvious bug, are people not allowed to complain? i get that frontend packages are buggy mess but that doesn’t mean people need to write only good things about it
@k0d3r1s bro chill - there’s a workaround above, besides, this only affects your ability to deploy to Vercel (or Netlify). You can still fire up
npm run dev
and learn as much as you want😃
@k0d3r1s Go vent your frustrations on your personal blog or social media, not in the maintainer’s GitHub thread
If anyone else finds this, in the Vercel camp, your workaround is
I suspect
would also work but I haven’t tested
The looks like an unrelated issue, and was fixed with #8534. The real issue presumably is that #8532 did not also update the auto adapter appropriately.