From fa2088808bb4f40ba65ba593cfd431b59d597ae0 Mon Sep 17 00:00:00 2001 From: Andrew McDonald Date: Mon, 15 Aug 2016 11:41:22 -0700 Subject: [PATCH] fix #1860 - Cannot find module for any node_modules When running on windows, 'UNIX' was incorrectly being passed into jszip as the host platform which causes it to generate a zip file which lambda doesn't unpack properly. ( I think its the \ vs / thing - the zip file looks correct when I open it in a gui tool, but using unpack unpacks a bunch of files with '\' in the filename and no actual folder structure ) --- lib/plugins/package/lib/zipService.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/package/lib/zipService.js b/lib/plugins/package/lib/zipService.js index 11a8e7673..73040444d 100644 --- a/lib/plugins/package/lib/zipService.js +++ b/lib/plugins/package/lib/zipService.js @@ -51,7 +51,7 @@ module.exports = { } }); - const platformName = ['UNIX', 'DOS'].indexOf(process.platform) !== -1 ? process.platform : + const platformName = ['UNIX', 'DOS', 'win32'].indexOf(process.platform) !== -1 ? process.platform : 'UNIX'; return zip.generateAsync({