A team packages a custom JavaScript action. The repository contains src/index.js and node_modules locally, but the released revision contains neither the dependencies nor a bundled distributable. Consumers see Cannot find module. What is the most reliable packaging correction?

Published
  1. Build and include a distributable containing the required runtime dependencies, and point runs.main at that file.
  2. Commit only package.json and assume GitHub automatically installs the JavaScript action dependencies before runs.main.
  3. Assume the caller project node_modules directory supplies all action dependencies.
  4. Set NODE_PATH to an absolute dependency directory that exists only on the author machine.

Comments — 0