mapbox / node-cpp-skel

Skeleton for bindings to C++ libraries for Node.js using node-addon-api
Creative Commons Zero v1.0 Universal
72 stars 10 forks source link

Add .npmignore - avoid "invalid ELF header" error #98

Closed mapsam closed 6 years ago

mapsam commented 6 years ago

Let's add an .npmignore file to prevent any binaries from being published with the module. Despite the gitignore being present, this can result in, for example, developing on a Mac and accidentally including the mac binaries in the published module - then downstream users installing via linux will hit the following error:

Error: /home/travis/...../node_modules/PACKAGE_NAME/lib/binding/PACKAGE.node: invalid ELF header

cc @mapbox/core-tech

mapsam commented 6 years ago

This was related to an empty npmignore file, not a missing one. https://github.com/mapbox/node-cpp-skel/pull/99#issuecomment-355139051 - closing since node-cpp-skel will default to gitignore