Skip to content

Update layer.js #327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2019
Merged

Update layer.js #327

merged 6 commits into from
Apr 16, 2019

Conversation

josete89
Copy link
Contributor

@josete89 josete89 commented Mar 1, 2019

Fix the issue ->

TypeError: Cannot set property 'pythonRequirements' of undefined
at ServerlessPythonRequirements.createLayers (/Users/alcaljos/Projects/GMR/gmr-imu-video-synch/node_modules/serverless-python-requirements/lib/layer.js:28:56)
From previous event:

Since the layers object seems to not be initialized.

Fix the issue ->  

TypeError: Cannot set property 'pythonRequirements' of undefined
    at ServerlessPythonRequirements.createLayers (/Users/alcaljos/Projects/GMR/gmr-imu-video-synch/node_modules/serverless-python-requirements/lib/layer.js:28:56)
From previous event:

Since the layers object seems to not be initialized.
Copy link
Contributor

@dschep dschep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this actually fix it? It doesnt seem like it would I'd imagine you need to do this:

  if (!this.serverless.service.layers) {    
    this.serverless.service.layers = {}
  }

Check if it's null or undefifned
dschep
dschep previously approved these changes Mar 4, 2019
@dschep dschep dismissed their stale review March 4, 2019 18:01

Wait, no, you're still setting the layer itself, not the layers object

@dschep dschep merged commit 6b5e0e2 into serverless:master Apr 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants