claudiajs / claudia

Deploy Node.js projects to AWS Lambda and API Gateway easily

Home Page:https://claudiajs.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Claudia Pack not including all files

jlarmstrongiv opened this issue · comments

  • Expected behaviour:

claudia pack: Packages node_modules, even those symlinked with npm link, into the zip.

  • What actually happens:

claudia pack: Only packages some files symlinked with npm link into the zip.

  • Link to a minimal, executable project that demonstrates the problem:

  • Steps to install the project:

  • Steps to reproduce the problem:

Specifically, I ran npm link inside apollo-server-agnostic and then ran npm link apollo-server-agnostic inside my example project.

Attached are the results from running claudia pack and npm pack. For some reason, claudia pack only includes the out/indexjs file, without out/ApolloServer.js and out/lambdaApollo.js. Links to github and npm.

If there’s not enough details to reproduce the issue, just close it. I ended up publishing the package to npm, which worked.

claudia-pack-apollo-server-agnostic.zip
npm-pack-apollo-server-agnostic-0.0.0.tgz.zip (had to compress it into a zip, since GitHub doesn’t allow tgz)

you seem to have a .npmignore (https://github.com/jlarmstrongiv/apollo-server-agnostic/blob/master/.npmignore) that probably causes the issue. claudia does npm pack to grab the source files, and npm pack is likely excluding those files. try running npm pack in the dependent project directly and see if it packs those files. if not, you'll need to modify .npmignore and/or .gitignore to pack it

check out https://claudiajs.com/tutorials/packaging.html for more info on how claudia includes files

on a related note, use npm local dependencies (file:) with a relative path instead of npm link, this will make sure claudia is packing the dependent project from the right directory on your disk. then you do not have to use npm links