Hi there, I’m banging my head against a wall trying to build sites within a monorepo with private GitHub packages for the last few days.
Netlify site: earnest-lokum-e7af7d
This is my monorepo setup:
repository-root/ ├─ package.json ├─ site-1/ │ ├─ netlify.toml │ ├─ package.json │ └─ source-1 ├─ site-2/ │ ├─ netlify.toml │ ├─ package.json │ └─ source-2 ├─ component-library-1/ │ ├─ package.json │ └─ code-1 └─ component-library-2/ ├─ package.json └─ code-2
I tried multiple different things but my understanding is that I need to set the base directory to e.g.
I found this anwser here about including private Github packages via npm preinstall script and installing dependencies seems to work. I do get an error message though but the build continues to run (sometimes):
8:16:17 AM: Installing NPM modules using Yarn version 1.22.10 8:16:17 AM: npm ERR! code ENOWORKSPACES 8:16:17 AM: npm ERR! This command does not support workspaces.
Eventually the build fails when trying to resolve one of those private packages:
Because the site doesn’t have a
yarn.lock file (only in the root), I specified the
NETLIFY_USE_YARN flag in the
Any idea what I’m doing wrong here?