-
Notifications
You must be signed in to change notification settings - Fork 417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3 incompatible with lerna #201
Comments
Hi @emrosenf , Yes, you're right, the I'm not quite sure at the moment how the I checked lerna (never used it before) and saw that lerna has a quite similar mechanism to retrieve a dependency tree of the used lerna repository, i.e. For what I currently see is, that for a complete and deep lerna support, all interactions of the plugin should use lerna as package manager to fetch and analyze the dependencies. In my eyes this would be a feature that could be explicitly enabled in the configuration (e.g. I have to play a bit more with lerna to fully understand how that works and if such an approach can be done completely package manager agnostic, so that native support for yarn would also be included. What do you think? |
I did some experiments with lerna now, but I did not manage to let |
@HyperBrain Thanks for taking a look. A typical lerna setup looks like this:
The private packages are linked. In the
Then run Then when I do |
I'll try with your instructions later today. If I get stuck I'll let you know and I can try with a sample repo. |
@emrosenf Sorry for the additional request ;-) Could you provide a lerna sample repo where I can reproduce the issue (with some instructions)? |
I think I found the issue. The solution is that the execution of |
@emrosenf The attached PR should solve the problem. Can you try if that works for you? |
Apologies for commenting on a closed ticket but i am seeing a similar issue when using at the packaging stage
|
I hope it works, if so, the webpack configuration property would be like
|
Thanks for the response. I have
which should catch any of the packages that start with @my-project, have also tried to list them explicitly. the problem is this seems to have to impact on the output of |
Yea same thing for me. @ed-sparkes did you end up solving it? I've added your whitelist config but then webpack doesn't build with module not found errors. Serverless: Invoke webpack:package
Error --------------------------------------------------
yarn list --depth=1 --json --production failed with code 1
{"type":"error","data":"An unexpected error occurred: \"https://registry.yarnpkg.com/@my-project/shared: Not found\"."} EDIT: I've just forgone Lerna in favour of just |
This is a Bug Report
Description
For bug reports:
The issue stems from a recent commit of V3 on this line.
The command
const command = 'npm ls -prod -json -depth=1';
fails when packages are linked using lerna.Output of the command always has an
ERR
. Example:This occurs even after doing
lerna bootstrap
. Since this command spits out an error code, the serverless-webpack bundling fails.Additional Data
The text was updated successfully, but these errors were encountered: