-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Sveltekit v next.175+ with Netlify adapter] Cannot find module 'stream/package.json' #2523
Comments
Hi, I had this problem too, I think the last time I encountered this, it was because of hidden dependencies in e.g. #1925 |
I had the same issue and installing stream fixed it for me as well... we will need to make a note of this in the docs for the netlify adapter, no? Or is this something that can be fixed in kit? |
This may be related to rollup/plugins#1004, so perhaps this will be fixed when rollup/plugins#1005 is merged and then Vite is upgraded to use it |
Adding But when I use SSR and access my application, got
Using @sveltejs/kit@1.0.0-next.176 and svelte@3.43.0. Any help? Thank you. |
if possible try to update your netlify node version to 16, where stream/web is available |
@tomatrow Installing I'd rather not have this in my dependencies but it's not that big of a problem if it makes things work. Thanks to all for the answers! |
I got a fix into |
@benmccann Still happening for me with |
Also tried 1.0.0-next.180 still fails - installing stream for now. |
Has there been any progress on this bug? |
Got it working with the following
After a few hours of research and struggling, and a fair number of failed attempts. Docs: https://docs.netlify.com/configure-builds/file-based-configuration/ |
What worked for me was specifying the [functions]
node_bundler = "esbuild" The entire config file consider the default values for the [build]
command = "npm run build"
publish = "build/"
[context.production]
environment = { NODE_VERSION = "14.18.0" }
[functions]
node_bundler = "esbuild" Thank you @justingolden21 for the example 👍 Update: I'm using the kit in version 1.0.0-next.180 |
This comment has been minimized.
This comment has been minimized.
In case anyone else runs into trouble deploying Kit to Netlify, the source of my mysterious show-stopping deploy error missing stream.json: The problem was with the Old, bad, copy-pasted from outdated tutorial (creates stream error)
New, works
Works! |
175 is the version that upgrades to node-fetch 3.0 final, which pulls in fetch-blob, relying on stream. https://github.com/sveltejs/kit/blob/master/packages/kit/CHANGELOG.md#patch-changes-7 |
Here's the contents of the relevant section of
It seems like a bug on Netlify's side that upgrading to Node 16 doesn't fix this because I filed a bug with them: netlify/zip-it-and-ship-it#743 |
Hmm. I guess my fix to |
Hmm, tricky. Jamstack, much as I love it, seems to yield some brittleness in the deploy part. |
As per advice here sveltejs/kit#2523
There's a PR out that would fix this issue: dependents/node-precinct#88 |
This is to fix the issue in netlify build: "Dependencies installation error" Ref: sveltejs/kit#2523 (comment)
This is now working. Existing projects will need to "clear cache and deploy" |
Still getting the error with Node 16, Latest SvelteKit, added stream manually (v0.02), added netlify.toml.
Was so excited about trying SvelteKit but not being able to rollout to Netlify is a pain. |
I'm also having the same issue, started today. |
There's an open issue for that: #5337 |
Describe the bug
Builds now fail on Netlify since version next.175. Local builds still work, and Netlify builds work with version next.174. I have another Sveltekit project that runs on Vercel and I have no build problems there.
I would like to provide more detail but I have no idea what's going on here. I provided the error log below.
Reproduction
This is a reproduction repo: https://github.com/f-elix/sveltekit-netlify-build-fail
It's essentially the Sveltekit demo app with netlify-adapter. I tried to deploy it on Netlify and got the same error as my main project.
Logs
System Info
Severity
blocking an upgrade
Additional Information
No response
The text was updated successfully, but these errors were encountered: