-
Notifications
You must be signed in to change notification settings - Fork 416
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
npm ls errors when using npm 7 workspaces #781
Comments
Looks like you found the solution on your own 👍 |
Ran into exactly the same problem |
Ran into exactly the same problem
solved by removing the two symlinks |
I had this issue because I had libraries in my "dependencies" that were not used anywhere (not sure if it was caused by a specific library, or by the presence of unused libraries, probably the latter). Removing them fixed it. |
don't know why but in my case I needed to add |
This is a Bug Report
Description
What went wrong?
Running
serverless deploy
orserverless package
outputs an error when using this plugin withincludeModules: true
and npm 7 workspaces.What did you expect should have happened?
The plugin should work with npm 7 workspaces, even if
npm ls
results in "missing" errors.What was the config you used?
In
webpack.config.js
define at least one external module, and inserverless.yml
enableincludeModules
:I've created a minimum example repo: boundstate/serverless-webpack-npm-7-example
What stacktrace or error message from your provider did you see?
Similar or dependent issue(s):
Additional Data
I believe this issue happens because in npm 7 they changed the output of the
npm ls
command,which is used by this plugin to get prod dependencies.
The errors about "missing" dependencies (because they are hoisted in a monorepo) are not handled as expected because the command outputs additional error lines.
npm 6.x stderr:
npm 7.x stderr:
I'm happy to submit a PR, but I would appreciate some suggestions on the best solution.
In the current code, stderr lines starting with
npm ERR! extraneous
/npm ERR! missing
/npm ERR! peer dep missing
are ignored. Maybe it should also ignorenpm ERR! code ELSPROBLEMS
and then all lines after the opening{
(start of JSON and error summary), but it's hard to know if this would ever hide valid errors the user needs to be aware of.The text was updated successfully, but these errors were encountered: