Hello.
I am having issues building my new website which is a sub-directory within a Yarn workspace. Here’s a bit about my setup.
Much like described in the docs, I have a Yarn monorepo which contains 2 packages:
- JavaScript library
- Documentation site which has that library as a dependency
I have attached my build logs and settings below.
What looks to be happening, is my build command is being run, but the local JS library is not being installed from NPM but through the workspace. So I am getting an error in the build logs that the package cannot be found.
While this installs and runs locally correctly, something happens in the build step that prevents the local JS library from being installed correctly. Maybe it’s something else though?
Site Name:
effortless-sunburst-b25c6f
Build Logs
Build Settings
Base directory: packages/docs
Build command: yarn build
Publish directory: packages/docs/_site
Additionally, in my Environment Variables I have:
NETLIFY_USE_YARN = "true"
NETLIFY_YARN_WORKSPACES = "true"
In the package.json file of the documentation website sub directory, I have the library installed with its version number, to try to get it to install from NPM and not the workspace.
"dependencies": {
"horologist": "^1.1.1"
}
And help getting over this hump would be terrific. Thank you!