nodejs-buildpack: Monorepo with scoped packages stopped working from 1.6.21 version
Summary:
We use monorepo, CF and community buildpack in our current project.
Project structure as follows:
root \
node_modules
packages \
package A
package B
package C
package.json
Yarn workspaces and lerna is used to manage dependencies in this monorepo. For packages we use scoped packages: @some-scope/package-A. This whole setup been working as expected till buildpack version 1.6.21 (1.6.20 is latest which works).
Current setup works locally, but then pushed to CF fails to find dependencies on runtime with pretty generic error:
2018-07-27T16:29:31.79+0300 [APP/PROC/WEB/0] ERR Error: Cannot find module ‘@some-scope/package-A’
2018-07-27T16:29:31.79+0300 [APP/PROC/WEB/0] ERR at Function.Module._resolveFilename (module.js:547:15)
It works with below dependencies:
Node version: 8.10, yarn version: 1.5.1, buildpack: 1.6.20, lerna: 2.11.0
But it stopped working after updating buildpack:
Node version: 8.10, yarn version: 1.5.1, buildpack: 1.6.21, lerna: 2.11.0
There seems to be something wrong within the buildpack it self and how it handles monorepo package linking.
We use also yarn offline mode, but I tried without it and observed same behaviour, so we can scope it out.
What did you expect to happen?
Yarn should install monorepo dependencies. Packages within this monorepo should be visible to one other and linked together.
What was the actual behavior?
Currently yarn install finishes successfully, but packages within monorepo is not visible to each other.
What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?
cf version 6.31.0+b35df905d.2017-09-15
What version of the buildpack you are using?
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 17 (6 by maintainers)
@jizusun the latest release will have the fix v1.6.41