npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Getting an error when trying to deploy with serverless

I’m trying to work with lambda layers and trying to add the /opt/layer-name to the externals property, but after doing so, i get the following error, I’m not sure if its npm or how webpack should work with deploying, but its def new when adding the additional string for my expected path.

0 info it worked if it ends with ok
1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘install’ ]
2 info using npm@6.5.0
3 info using node@v10.15.0
4 verbose npm-session ef9371674631680a
5 silly install runPreinstallTopLevelLifecycles
6 silly preinstall asdf-services@1.0.0
7 info lifecycle asdf-services@1.0.0~preinstall: asdf-services@1.0.0
8 silly install loadCurrentTree
9 silly install readLocalPackageData
10 timing npm Completed in 415ms
11 error cb() never called!
12 error This is an error with npm itself. Please report this error at:
13 error

Thx, Shawn

I only have a generic suggestion, not specific to lambda or serverless, so you might get a much better answer.

The display of the underlying error message causing “error cb() never called!” was improved in npm v6.6.0. If you are able to upgrade npm, you might get a more informative error message.

Awesome, thx for the response. Will definitely look into upgrading and seeing if this fixes it.