Closed exoego closed 3 years ago
hi @exoego, thank you for the issue and PR. it seems like a nice to have feature
FYI: I have built on this branch and confirmed the npm error gone.
:tada: This issue has been resolved in version 1.21.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Hello.
On NPM v7+, my package.json requires
npm install --legacy-peer-deps
command to be executed, instead of plainnpm install
. However, it seems that serverless-esbuild currently does not support passing options tonpm install
: https://github.com/floydspace/serverless-esbuild/blob/753e4aede6e826adc77cf82847520f1f84f9bef8/src/packagers/npm.ts#L104-L109 So,sls deploy
fails due to npm installation failure.It would be helpful if there is an option to passing arguments to
npm install
something like:Error message
Reproduction
npm install --legacy-peer-deps
sls deploy
Files
serverless.yml
package.json
index.ts