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
{{ message }}
This repository was archived by the owner on May 17, 2021. It is now read-only.
I followed this to the T, I have a feeling serverless-webpack is messing it up. When i look in the transpiled code I see that the module is not found const test = webpack_require(!(function webpackMissingModule() { var e = new Error("Cannot find module 'test'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));
# NOTE: update this with your service name
service: api
# Create an optimized package for our functions
package:
individually: true
exclude:
- schema-layer/**
plugins:
- serverless-bundle # Package our functions with Webpack
- serverless-offline
- serverless-dotenv-plugin # Load .env as environment variables
provider:
name: aws
runtime: nodejs10.x
stage: dev
region: us-east-1
# To load environment variables externally
# rename env.example to .env and uncomment
# the following line. Also, make sure to not
# commit your .env.
#
#environment:
# sampleEnvVar: ${env:SAMPLE_ENV_VAR}
functions:
hello:
handler: handler.hello
events:
- http:
path: hello
method: get
layers:
- { Ref: SchemalayerLambdaLayer }
layers:
schemalayer:
path: schema-layer
custom:
bundle:
linting: false # disable linting as a part of the build process
I followed this to the T, I have a feeling serverless-webpack is messing it up. When i look in the transpiled code I see that the module is not found const test = webpack_require(!(function webpackMissingModule() { var e = new Error("Cannot find module 'test'"); e.code = 'MODULE_NOT_FOUND'; throw e; }()));