asprouse / serverless-webpack-plugin

Use Webpack to optimize your Serverless Node.js Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version 0.4.4. is broken

roman-yakobnyuk opened this issue · comments

We found that in the version 0.4.4 imports and requires are not resolving properly on lambda deployment.

It works fine if version is reverted to 0.4.3

Error we get is:

Module not found: Error: Cannot resolve 'file' or 'directory' ../../lib/auth/login in /home/$PATH/_meta/_tmp/login@1468978270231
 @ ./_meta/_tmp/login@1468978270231/handler.js 12:13-44  

Can you provide more information on your setup? NPM version? My guess is that it may be due to the changes in #23, but I need more info to reproduce.

I have the same issue after the upgrade from 0.4.3 to 0.4.4. It seems loading custom dependencies (using a relative path) breaks. For example:

const auth = require('../auth');

NPM version is 3.9.3 on Node version 4.3.2.

I'll look into this issue and hopefully have a fix today. In the meanwhile downgrade to 0.4.3