Home
Support Forums

Deploy fails with missing Netlify dependency

I need advice to debug SvelteKit deploy Netlify App

Hi @renefournier,

Could you try to add stream/package.json in the external_node_modules block as explained here: File-based configuration | Netlify Docs

To netlify.toml? Like:

[build]
command = “npm run build”
publish = “build/”
functions = “functions/”
[functions]
external_node_modules = [“stream/package.json”]

The problem was with the netlify.toml file I was using.

Old, bad, copy-pasted from outdated tutorial (creates stream error)

[build]
  command = "npm run build"
  publish = "build/"
  functions = "functions/"

New, works

[build]
  command = "npm run build"
  publish = "build"
 
[dev]
 command = "svelte-kit dev"
 
[functions]
  directory = "netlify/functions"
  node_bundler = "esbuild"

Works!