-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Problem with Lerna mono-repo and local dependencies #257
Comments
Hi @TomiTakussaari , unfortunately the What you might try to do is, to add the private modules to the Some thoughts: However, I have to do some experiments first, to see if such an approach would be feasible. |
Unfortunantely, those private modules depended on non-webpack compatible packages, so bundling them did not work. I also tried this: "dependencies": {
"my-module": "file:../my-module",
} That did not work because serverless-webpack copies package.json to .webpack subdir, rendering that relative path invalid. In the end, I ended up moving code from private modules to my-serverless-module, adding necessary package.json deps, and then depending on code from my-serverless-module on other packages, using Not that pretty, but it seems to work.. |
@TomiTakussaari Happy to hear that you found a way that overcomes the problem.
Indeed, when using file references, the reference should be changed by the plugin internally, to work from the dependencies folder, so that it finds the dependency. Good catch 🙌 . |
Created a bug for the file reference issue. Closing this now. |
This is a Bug Report
Description
I have private mono-repo project using Lerna, with Serverless app being one package.
Serverless package depends on couple of other private packages, that are sym-linked to serverless-app/node-modules via Lerna bootstrap.
Because not all my dependencies are webpack compatible, I have to use
Which leads to serverless-webpack issuing "npm install" command, which then fails because of my Lerna managed local packages are not found from NPM repository..
Is there something that can be done ? Skip NPM install somehow ?
Additional Data
The text was updated successfully, but these errors were encountered: