Validate dependancies are present before deploying
See original GitHub issueIf a user clones down a service and forgets to npm install
they can deploy broken services.
They see this ultra vague error in lambda logs
START RequestId: dd920e5d-7ee0-11e7-a6f0-7fe125518660 Version: $LATEST
Unable to import module 'handler': Error
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
END RequestId: dd920e5d-7ee0-11e7-a6f0-7fe125518660
This should be solved by the framework.
- User runs
sls deploy
- Framework check package.json
- Framework validates that the node_module folder is present
If node_modules not found, error (or automatically run npm i
)
If node_modules good, continue with deploy as usually.
This is an easily solvable issue that causes unnecessary user pain.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Can SCCM check for dependencies before running ... - TechNet
Also note that deployment packages are not deployed to clients in any way. Deployment packages are simply repositories of update binary files ...
Read more >Validation, Dependency Checking, and Deployment
Project validation; Dependency checking; Project deployment. Tags. suitecloud development frameworknetsuite. Retention Time.
Read more >Deploy an Application with Dependencies - OutSystems 11 ...
Confirm with the teams that are responsible for each dependency module if the current version can be deployed to the destination environment.
Read more >How can I determine CPAN dependencies before I deploy a ...
These then lead to you not necessarily noticing that your latest project has a requirement on a non-core module. As there is generally...
Read more >Change Sets Best Practices - Salesforce Help
Review these best practices about dependencies, validation, ... Validate change sets before deployment: You can perform a test deployment of an inbound ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
In the same sense, Serverless could also validate that the handlers defined are present and indeed exporting the required functions.
E.g., given a configuration like this:
Serverless should verify that
src/handlers/install
file exists and that also provides theinstallHandler
function.It will save the developers so much time.
Closing since this is a duplicate of https://github.com/serverless/serverless/issues/3270.