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 advance4 Replies
metropolitan-bronze•6d ago
there is a netlify vite plugin for hosting RC now
metropolitan-bronze•6d 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...
inland-turquoiseOP•3d 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....deep-jade•3d ago
good catch
cc @Netlify (Partner) maybe worth calling this out in the docs