I’m running into an odd behavior where monorepo builds have recently broken. I can try and create a reproduction with minimal code tomorrow, but posting now to see if this is a known issue.
- One package in my monorepo, netlify-deploy, imports other packages to create various Lambda functions.
- Dependencies of that netlify-deploy package are built separately in a build command.
- The netlify-deploy package will then run through the standard ZISI command.
- As that command runs, Netlify will attempt to build TypeScript files in the dependency package within that dependency’s
/src
directory, even though allpackage.json
exports
files point to the/dist
directory. - I have some esbuild plugins handling assets in those deps, so ZISI fails.
- The entire build fails.
This was not an issue as of netlify-cli
v17.
Potential solutions:
A: Tell ZISI to honor the files
attribute in the dependency’s package.json
and ignore the src/
directory.
B: (Separate issue): I bundle things manually. This is working, except there are some packages (specifically, @sparticuz/chromium
), that I need to include separately. However, even if I add it to external_node_modules
in netlify.toml
or copy my netlify-deploy/package.json
file to the base output directory that @sparticuz/chromium
package is not being included.