Cannot read property 'replace' of undefined
Y0lan opened this issue · comments
Yolan Maldonado commented
you can find my current code with this issue open in:
https://github.com/Y0lan/write-it/issues/1
commande:
serverless deploy
logs:
Serverless: Configuration warning:
Serverless: at root: unrecognized property 'iamRoleStatements'
Serverless: at 'functions.delete.events[0].http': unrecognized property 'patch'
Serverless: at 'functions.delete.events[0].http': should have required property 'path'
Serverless:
Serverless: Learn more about configuration validation here: http://slss.io/configuration-validation
Serverless:
Serverless: Deprecation warning: Starting with next major version, API Gateway naming will be changed from "{stage}-{service}" to "{service}-{stage}".
Set "provider.apiGateway.shouldStartNameWithService" to "true" to adapt to the new behavior now.
More Info: https://www.serverless.com/framework/docs/deprecations/#AWS_API_GATEWAY_NAME_STARTING_WITH_SERVICE
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Invoke webpack:validate
Serverless: Invoke webpack:compile
Serverless: Bundling with Webpack...
Serverless: Invoke webpack:package
Serverless: No external modules needed
Serverless: Packaging service...
Type Error ---------------------------------------------
TypeError: Cannot read property 'replace' of undefined
at AwsCompileApigEvents.getHttpPath (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js:190:22)
at /home/yolan/.npm-packages/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js:48:28
at Array.forEach (<anonymous>)
at /home/yolan/.npm-packages/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js:44:37
at Array.forEach (<anonymous>)
at AwsCompileApigEvents.validate (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/lib/validate.js:43:55)
at Object.package:compileEvents [as hook] (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/plugins/aws/package/compile/events/apiGateway/index.js:251:31)
From previous event:
at PluginManager.invoke (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/classes/PluginManager.js:510:22)
at /home/yolan/.npm-packages/lib/node_modules/serverless/lib/classes/PluginManager.js:545:24
From previous event:
at PluginManager.run (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/classes/PluginManager.js:545:8)
at /home/yolan/.npm-packages/lib/node_modules/serverless/lib/Serverless.js:170:33
at processImmediate (internal/timers.js:456:21)
at process.topLevelDomainCallback (domain.js:137:15)
From previous event:
at Serverless.run (/home/yolan/.npm-packages/lib/node_modules/serverless/lib/Serverless.js:157:74)
at /home/yolan/.npm-packages/lib/node_modules/serverless/scripts/serverless.js:50:26
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 12.18.2
Framework Version: 2.11.1
Plugin Version: 4.1.2
SDK Version: 2.3.2
Components Version: 3.3.0
I have no idea why it does not run, any help understanding would be appreciated. Thanks a lot!
Jay commented
Yeah looks like there is a typo:
unrecognized property 'patch'
And it seems like you fixed it as well.
Yolan Maldonado commented
Yes I should learn how to read log!