asprouse / serverless-webpack-plugin

Use Webpack to optimize your Serverless Node.js Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: Cannot find module '<<root>>'] code: 'MODULE_NOT_FOUND'

flashsnake-so opened this issue · comments

I am getting this error after following the instruction from README.md.

Serverless: Deploying the specified functions in "demo" to the following regions: us-east-1  
Serverless: | { [Error: Cannot find module '<<root_folder>>'] code: 'MODULE_NOT_FOUND' }
Serverless: ------------------------  
Serverless: Successfully deployed the following functions in "demo" to the following regions:   
Serverless: us-east-1 ------------------------  
....
metric filters created

My configuration in s-function.json is:

"custom": {
    "excludePatterns": [],
    "webpack": {
      "configPath": "./"
    }
  }

Not such what I am doing wrong.

This plugin seems not support v0.5.6.

Updated: After putting the correct settings in custom object. This error goes away.