You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current behavior
Using the default typescript template aws-node-js template with httpApi serverless offline gives the following error:
Type Error ---------------------------------------------
TypeError: Cannot read property 'startsWith' of undefined
at generateHapiPath (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\utils\generateHapiPath.js:10:23)
at HttpServer.createRoutes (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\events\http\HttpServer.js:264:51)
at Http._create (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\events\http\Http.js:41:65)
at C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\events\http\Http.js:50:12
at Array.forEach (<anonymous>)
at Http.create (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\events\http\Http.js:45:12)
at ServerlessOffline._createHttp (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\ServerlessOffline.js:216:53)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)
at ServerlessOffline.start (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\ServerlessOffline.js:131:5)
at ServerlessOffline._startWithExplicitEnd (C:\Users\iliev\OneDrive\Documents\Projects\TukaSum\Kod\Lambda\TukaSum-Lambda\Lambda-Functions\source\create-post\node_modules\serverless-offline\dist\ServerlessOffline.js:180:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: win32
Node Version: 12.16.2
Framework Version: 1.71.3
Plugin Version: 3.6.12
SDK Version: 2.3.1
Components Version: 2.30.11
Sample code
serverless.yaml
note: the only change is from http to httpApi
service:
name: serverless
# app and org for use with dashboard.serverless.com
#app: your-app-name
#org: your-org-name
custom:
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
# Add the serverless-webpack plugin
plugins:
- serverless-webpack
- serverless-offline
provider:
name: aws
runtime: nodejs12.x
apiGateway:
minimumCompressionSize: 1024 # Enable gzip compression for responses > 1 KB
environment:
AWS_NODEJS_CONNECTION_REUSE_ENABLED: 1
functions:
hello:
handler: handler.hello
events:
- httpApi: "*"
chardos
changed the title
HttpAPi does not work with template aws-nodejs-typesctript
HttpApi does not work with template aws-nodejs-typescript
Jun 9, 2020
Bug Report
Current behavior
Using the default typescript template aws-node-js template with httpApi serverless offline gives the following error:
Sample code
note: the only change is from http to httpApi
Environment
serverless
version: 1.71.3serverless offline
version: 6.3.0node
version: 12.16.2os
: windows 10The text was updated successfully, but these errors were encountered: