ScottBrenner/generate-changelog-action

Error: valid package.json not found

wernerfred opened this issue · 6 comments

This action produces the following error when used like shown in the example:

Run scottbrenner/generate-changelog-action@master
/usr/bin/docker run --name e87b520ef943f0bed24d3f9c56c6777de8a64d_2dadf6 --label e87b52 --workdir /github/workspace --rm -e REPO -e HOME -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/ansible-role-packages-test/ansible-role-packages-test":"/github/workspace" e87b52:0ef943f0bed24d3f9c56c6777de8a64d
Error: valid package.json not found
    at /usr/lib/node_modules/generate-changelog/lib/package.js:18:11
    at tryCatcher (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/promise.js:725:18)
    at _drainQueueStep (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:93:12)
    at _drainQueue (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:86:9)
    at Async._drainQueues (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:102:5)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/lib/node_modules/generate-changelog/node_modules/bluebird/js/release/async.js:15:14)
    at processImmediate (internal/timers.js:439:21)

Error: valid package.json not found

Do you .. have a package.json file in the repository where you're running this?

No I have not. Should I?

I believe it is required, suggest opening an issue in the "upstream" repository - https://github.com/lob/generate-changelog - can't do much about it here.

Can you then maybe update your readme that this action uses a linter tool which is primarly for npm package development (and therefore needs a package.json )
So other people will know before implementing the action themselves just to run into the same issue

Totally, had no idea! Thanks for bringing this to my attention.