TypeError: Cannot read property 'package' of null #9801
Unanswered
shivimakwana
asked this question in
Q&A
Replies: 1 comment 5 replies
-
Hello @shivimakwana - it looks like a request for help instead of bug report so I'm going to move this to discussions for now. Could you please format your configuration file? There's a few configuration errors - did you try to solve them first? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
my serverless.yml file looks like this:
service: chrome-layer
provider:
name: aws
runtime: python3.6
region: ap-southeast-1
timeout: 900
layers:
chromedriver:
path: chromedriver
description: chrome driver layer
CompatibleRuntimes: [
"python3.6"
]
resources:
Outputs:
ChromedriverLayerExport:
Value:
Ref: ChromedriverLambdaLayer
Export:
Name: ChromedriverLambdaLayer
When I run below cmd from the dir where this file is placed -
serverless deploy
Its giving following error:
Serverless: Configuration warning:
Serverless: at 'layers.path': should be object
Serverless: at 'layers.description': should be object
Serverless: at 'layers.CompatibleRuntimes': should be object
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:
Type Error ----------------------------------------------
TypeError: Cannot read property 'package' of null
at /Users/shivim/.nvm/versions/node/v16.4.2/lib/node_modules/serverless/lib/plugins/package/package.js:45:36
at Array.some ()
at initialize (/Users/shivim/.nvm/versions/node/v16.4.2/lib/node_modules/serverless/lib/plugins/package/package.js:44:63)
at PluginManager.run (/Users/shivim/.nvm/versions/node/v16.4.2/lib/node_modules/serverless/lib/classes/PluginManager.js:611:15)
at Serverless.run (/Users/shivim/.nvm/versions/node/v16.4.2/lib/node_modules/serverless/lib/Serverless.js:443:30)
at /Users/shivim/.nvm/versions/node/v16.4.2/lib/node_modules/serverless/scripts/serverless.js:745:26
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: darwin
Node Version: 16.4.2
Framework Version: 2.52.1
Plugin Version: 5.4.3
SDK Version: 4.2.6
Components Version: 3.14.2
Serverless: Deprecation warning: Starting with next major, Serverless will throw on configuration errors by default. Adapt to this behavior now by adding "configValidationMode: error" to service configuration
More Info: https://www.serverless.com/framework/docs/deprecations/#CONFIG_VALIDATION_MODE_DEFAULT
Please help to resolve this issue.
Beta Was this translation helpful? Give feedback.
All reactions