-
-
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
Module Not Found in Build Production w/ Netlify #5337
Comments
Same happens to me. |
I’ve just had the same thing happen to me, but fixed the issue by using @sveltejs/adapter-netlify directly (rather than via @sveltejs/adapter-auto) and pinning to the previous version of the adapter.
|
Same here |
I have the exact same issue, tried your fix bit it didn't work for me, I still get the same error. Is it implemented in the same way as in the docs (https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify#installation) or did you do something else? |
Same here |
Just tried building it locally using |
I can't netlify build even in local. |
This works for me. |
Workss!! |
I fixed this issue by downgrading to version 65 instead of 66. Then followed the normal Netlify tutorial |
Yep, downgrading to version 65 worked for me. |
I managed to get my SvelteKit app to build on Netlify by downgrading
But when I try and run the app it crashes with the following error message (in Chrome):
|
Let's reopen this one. I don't see an open issue on it and it is still currently broke on the |
Even downgrading is no longer working for me on a new site with the downgraded version of the adapter
|
@brittneypostma |
I tried manually changing all instances of it and removing the package-lock completely and still getting an error. |
llhttp is from Undici: #5117 I can workaround this by setting |
@ascorbic I'm stumped on this one. Any ideas why adding Undici to SvelteKit might have broken deploys on Netlify? |
Hey @benmccann. The mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd.wasm.js'), 'base64')); That file doesn't exist, so when it tries to bundle the function, it fails. This seems to be an error in the Vite bundling process, because that require is still in the compiled shim file. |
Thank you! I believe the bug was in |
This comment was marked as off-topic.
This comment was marked as off-topic.
I've just checked and can confirm that the new version fixes it for me! |
great! thank you!! |
That looks like a different issue @ghostdevv. My guess would be that your version of Node is too old |
@benmccann I thought that too before I found this issue. I am on node 16? I can also try 18 if netlify supports that |
The minor version often matters as well. You might want to make sure you're on the latest Node 16 |
The default node Lambda runtime on Netlify is currently 14 (though it's changing to 16 on Monday), so you may need to manually set it. Set the env var |
@ascorbic That fixed it ty |
The changed default runtime has now rolled out, so new deploys should be on 16 now unless manually specifying another version. |
sharing for others to find - i also had this issue but a redeploy didnt fix it because i had |
@sw-yx I think now that Netlify's default is 16, you should be able to remove it completely. |
If you are seeing this and trying to deploy a svelte app to netlify and none of the above options work. Try to check if you have git config core.ignorecase if it's true try to change it to false with the following command this worked for me |
Describe the bug
After I updated Svelte to the latest update, I encountered an error that I can't seem to overcome when deploying to Netlify, from code written by Sveltekit in the .netlify foldered.
I have all the latest versions of - Svelte, Sveltekit, SvelteKit Netlify Adapter, and llhttp.
Everytime I try to deploy, I get this error:
I've installed llhttp in the top level package.json. I went digging, and in the file ".netlify/shims.js" on line 3396, it trys:
mod = await WebAssembly.compile(Buffer.from(require('./llhttp/llhttp_simd.wasm.js'), 'base64'));
This is where the error is coming from, I believe.
My code is hosted on replit: https://replit.com/@AcousticTypewriter911/AudreyTk#app
And Github:https://github.com/INTERNAL-ERROR/AudreyTk
Would welcome and advice on how to correct this error. I can "npm run build && npm run preview" without error, this only happens in production.
Reproduction
I have followed every step in how to install Svelte & Sveltekit, and how to run it on Netlify. I'm not sure where I went wrong.
Logs
System Info
Severity
blocking all usage of SvelteKit
Additional Information
I won't be able to use sveltekit if this error is not fixed.
The text was updated successfully, but these errors were encountered: