Building for netlify not working on RC
Hi,
With the upgrades for to RC I am getting this error when trying to run
netlify deploy.
I have this netlify.toml which has been working OK.
And these dependencies in package.json
Node.js v22.20.0 arm64 ( node -p process.arch process.platform)
Attached is the vite.config.json and the netlify.toml.
There is no .netlify/functions-internal directory being created when I run vite build so have I missed something with the configuration here? As I said, this was working with start 1.31.x
This application has a number of server functions and server only routes.
Any ideas or hints to fix this would be much appreciated. Many thanks in advance8 Replies
afraid-scarlet•2mo ago
there is a netlify vite plugin for hosting RC now
afraid-scarlet•2mo ago
Hosting | TanStack Start React Docs
Hosting is the process of deploying your application to the internet so that users can access it. This is a critical part of any web development project, ensuring your application is available to the...
foreign-sapphireOP•2mo ago
Thanks @APPLE I think I am already using that. It's the last line of the imports. Or am I still missing something?
there is a
.netlify/v1/functions/server.mjs file being created if I run vite build
I change the build section of the netlify.toml to this:
The error is now:
I this the esbuild error might be because of the "While bundling function "server" error but now 100% sure.
(The node_modules/esbuild directory only has the arm64 version of the package. )
Still struggling with this.
I have run npm using arch -arm64 npm install and the output of npm ls --all | grep '@esbuild/' shows there is no x86 esbuild installed. (showing unmet peer dependency for all the other architectures other than arm64). So it appears I have the correct version installed.
Current dependencies:
npm ls returns this for esbuild:
There is also an issue where the server functions are not being found by the netlify deploy which are built to the .netlify directory. To get around this, I needed to add the functions to my netlify.toml. This is not listed in the start documentation so does this also need to added? Is this correct?
Why is the publish value set todist/client? We want to deploy/publish the dist/server directory too right?
This was all working in 1.31.x but now 1.32.x is blowing up. I'm not sure if this is a tanstack issue or a netlify issue.
Any advice or directions on this would be highly appreciated.
After all this, it turns out that it was the netlify-cli which is installed globally and not in the project. Updated that and it worked. Urgh....conscious-sapphire•2mo ago
good catch
cc @Netlify (Partner) maybe worth calling this out in the docs
harsh-harlequin•2mo ago
Thank you! I've asked our engineering team to look into this to confirm where the issue is.
deep-jade•2mo ago
Thank you for all these details, @Jingle Bells! I believe the summary is that
@netlify/vite-plugin-tanstack-start requires netlify-cli (if used) >= 17.31.0, but we weren't documenting this. We'll get this updated. Thanks for helping us harden before the stable release! 🫡adverse-sapphire•3w ago
this url is not available now
deep-jade•2w ago
here's the new url: https://tanstack.com/start/latest/docs/framework/react/guide/hosting#netlify