question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Validate dependancies are present before deploying

See original GitHub issue

If 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.

  1. User runs sls deploy
  2. Framework check package.json
  3. 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:closed
  • Created 6 years ago
  • Reactions:4
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
kbariotiscommented, Aug 19, 2017

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:

functions:
  install:
    handler: src/handlers/install.installHandler
    events:
      - http: GET /

Serverless should verify that src/handlers/install file exists and that also provides the installHandler function.

It will save the developers so much time.

0reactions
pmuenscommented, Feb 12, 2019

Closing since this is a duplicate of https://github.com/serverless/serverless/issues/3270.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found