danger-js icon indicating copy to clipboard operation
danger-js copied to clipboard

Cannot find module '../runner/Dangerfile' at 2.0.0-alpha.18

Open fossamagna opened this issue 9 years ago • 5 comments

I upgraded danger-js version 2.0.0-alpha.18 from 2.0.0-alpha.15. I received error and stacktrace, when I ran command follow to:

$ DANGER_GITHUB_API_TOKEN=xxxxxxxxxx yarn danger pr https://github.com/fossamagna/foo/1
yarn run v1.1.0
$ "/Users/fossamagna/git/repo/node_modules/.bin/danger"
module.js:529
    throw err;
    ^

Error: Cannot find module '../runner/Dangerfile'
    at Function.Module._resolveFilename (module.js:527:15)

    at Function.Module._load (module.js:476:23)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/fossamagna/git/repo/node_modules/danger/distribution/runner/Executor.js:38:20)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
error Command failed with exit code 1.

No error happened, when I downgrade to 2.0.0-alpha.15. I think that cause of this error is same to https://circleci.com/gh/danger/danger-js/924?utm_campaign=vcs-integration-link&utm_medium=referral&utm_source=github-build-link

fossamagna avatar Oct 04 '17 03:10 fossamagna

Agree, seeing the same issues in this greenkeeper PR on Peril: https://github.com/danger/peril/pull/155

Will try get some time to figure it today

orta avatar Oct 04 '17 15:10 orta

Just adding, for whatever reason distribution/runner/Dangerfile.js isn't being generated:

templates/
DangerUtils.d.ts
DangerUtils.js
DangerUtils.js.map
Dangerfile.d.ts
Dangerfile.js.map
DangerfileRunner.d.ts
DangerfileRunner.js
DangerfileRunner.js.map
Executor.d.ts
Executor.js
Executor.js.map

miwillhite avatar Oct 06 '17 21:10 miwillhite

I've just tried shipping a new release - I think I used yarn publish last time, this time I went back with npm publish

orta avatar Oct 07 '17 00:10 orta

@orta Thank you. I tried new version. I retrieve no error. I think that this problem is resolved.

fossamagna avatar Oct 08 '17 14:10 fossamagna

👍

orta avatar Oct 08 '17 18:10 orta