aws-sam-cli: Sam Build Failed: NodejsNpmBuilder:NpmPack
After trying a SAM project using python, I suddenly need to create a package.json file for each lambda function.
Otherwise, I will get an error:
Build Failed
Error: NodejsNpmBuilder:NpmPack - NPM Failed: npm ERR! code ENOLOCAL
I don’t need any node_modules for my lambda function, so I would like not to include it in my folder.
For each function, this script will run.
Running NodejsNpmBuilder:NpmPack
Running NodejsNpmBuilder:CopyNpmrc
Running NodejsNpmBuilder:CopySource
Running NodejsNpmBuilder:NpmInstall
Running NodejsNpmBuilder:CleanUpNpmrc
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (5 by maintainers)
The differences in command line:
First project:
Second project: