netlify / build-image

This is the build image used for running automated builds
MIT License
496 stars 197 forks source link

Monorepo project cannot found pnpm #855

Closed Dunqing closed 1 year ago

Dunqing commented 1 year ago

Describe the bug

In the monorepo project, the netlify configuration files are distributed in different directories, it will not be able to find pnpm, if there is pnpm-lock.yaml in the base directory of that configuration, it will work.

Like the following

- apps
  - main
    - netlify.yaml (cannot found `pnpm`)
  - child
    - netlify.yaml (found `pnpm`)
    - pnpm-lock.yaml 
- pnpm-workspace.yaml
lukasholzer commented 1 year ago

as a workaround you can use the envrionment variable NETLIFY_USE_PNPM=true in your envrionment variable settings in the UI. This will force the build to use pnpm.

Already working on this issue

Dunqing commented 1 year ago

as a workaround you can use the envrionment variable NETLIFY_USE_PNPM=true in your envrionment variable settings in the UI. This will force the build to use pnpm.

Thank you, the workaround is good for me