Monday, 17 April 2017

how to make webpack use shared node modules in the parent directory

I have the following folder structure:

  • parent directory
    • node_modules
    • company
      • serverless.yml
      • handler.js
      • webpack.config

I have to use webpack to create packages and upload into aws-lamda. But the webpack is looking for node modules. But I am getting the following error:

Overriding the webpack directory in serverless-webpack since it uses v1 version of webpack...
cp: cannot stat 'node_modules/webpack': No such file or directory

How can I make webpack.config point to the node_modules in the parent directory



via suku

No comments:

Post a Comment