Support Forums

Deployment fails from GitHub but works with the Netlify CLI

Hi, I’m deploying a SvelteKit project with the Netlify adapter (can’t reveal the ID right now, it’s still not supposed to be public), but for some reason, when Netlify automatically deploys from the GitHub repo, it fails with the following error.

However, when I deploy it manually with the Netlify CLI, it works perfectly, and frankly, I’m lost.

What’s going on here?

(I’ve tried to only build using netlify build and it still worked as expected locally)

Could you try using esbuild:

  node_bundler = "esbuild"

That would go in your netlify.toml.

If that doesn’t change anything, you can add yet another line to the same block:

external_node_modules = ["module1", "module2"]