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
and the directory name is within EXCLUDE_GLOBS EXCLUDE_GLOBS="sub-module"
the following error occurs.
As a workaround, one can exclude the directory content EXCLUDE_GLOBS="sub-module/*", but this leaves sub-module/package.json in the zip file.
$ node-lambda package
Warning!!! You are building on a platform that is not 64-bit Linux (darwin.x64). If any of your Node dependencies include C-extensions, they may not work as expected in the Lambda environment.
=> Moving files to temporary directory
=> Running npm install --production
/usr/local/lib/node_modules/node-lambda/lib/main.js:543
throw err;
^
Error: Command failed: npm -s install --production --prefix /var/folders/4c/b2p9cxl9699211w4mps998g40000gp/T/apiAccess-1494407987225
at ChildProcess.exithandler (child_process.js:204:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:886:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
$
The text was updated successfully, but these errors were encountered:
@ekkards
Thanks for the report.
It was confirmed that package.json is not excluded, but it seems to be a problem that npm install fails as follows.
===> node-lambda package does the following processing.
Create a temporary directory and copy the project's files
Run npm install --production in that temporary directory
Zip the temporary directory
In this case, since EXCLUDE_GLOBS="sub-module" is specified, sub-module is not copied to temporary directory in phase 1, it seems that npm install of 2 has failed.
Thank you for the explanation with npm in the temporary directory. Now it is clearer:
since npm install is run, the subdirectory sub-module must be present in the temp directory for the npm to succeed.
the npm install copies the files from sub-module to node_modules/sub-module
node_modules is then zipped
If I exclude the files of the sub-module, the resulting zip is not working, as I found out now.
So lets keep the files of a git submodule.
Suggest to close the issue.
If a git submodule is listed in package.json
and the directory name is within EXCLUDE_GLOBS
EXCLUDE_GLOBS="sub-module"
the following error occurs.
As a workaround, one can exclude the directory content
EXCLUDE_GLOBS="sub-module/*"
, but this leaves sub-module/package.json in the zip file.The text was updated successfully, but these errors were encountered: