@remix-run/netlify not found in deployed function despite correct config, lockfile, and bundler

netlify app is https://683ef2f3b1e3b70496998ce7--neon-lolly-c4a6c9.netlify.app/

  • Link to my repo is:

I am deploying a Remix app to Netlify using the new-main branch.

I have tried all of the following:

  • @remix-run/netlify in dependencies (not just devDependencies)
  • Clean install and lockfile (tried both npm and yarn)
  • Both esbuild and zisi bundlers in netlify.toml
  • Added a postinstall script
  • Set NODE_VERSION = 20 in both package.json and Netlify UI
  • No monorepo or custom base directory
  • Cleared build cache and redeployed

The deployed function always fails with:

Runtime.ImportModuleError - Error: Cannot find module ‘@remix-run/netlify’

This happens even though the module is present in my lockfile and local node_modules.

Is there a known issue with Netlify’s function packaging or a workaround for this?

Any help would be appreciated!

hey @AllenJame123 thanks for getting in touch! Looking at your vite.config.ts file it looks like you might not yet have the required Netlify config supplied - can you take a look at the steps here when you get a chance and let us know if that helps?