danger / danger/danger-ts

Example in README not working

Open
#2 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Hi there!

I'm trying out the example given in the README, with slight modifications to use the latest `actions/checkout` and `actions/setup-node`
```
name: "Danger TS"

on: pull_request

permissions:
actions: write
checks: write
contents: write
issues: write
pull-requests: write
statuses: write

jobs:
danger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: "Use npx to run the dangerfile"
run: "npx danger-ts"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
The result is a CI run [failure](https://github.com/tlylt/danger-demo/actions/runs/4201699300/jobs/7288964524):
```
Run npx danger-ts
npm WARN exec The following package was not found and will be installed: danger-ts@1.0.0
node:internal/modules/cjs/loader:998
throw err;
^

Error: Cannot find module '/home/runner/.npm/_npx/d1[7](https://github.com/tlylt/danger-demo/actions/runs/4201699300/jobs/7288964524#step:4:8)13d9723[8](https://github.com/tlylt/danger-demo/actions/runs/4201699300/jobs/7288964524#step:4:9)8ceec/node_modules/lib/node_modules/danger-ts/node_modules/danger/distribution/commands/danger-runner.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:[9](https://github.com/tlylt/danger-demo/actions/runs/4201699300/jobs/7288964524#step:4:10)95:15)
at Function.Module._load (node:internal/modules/cjs/loader:841:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:[12](https://github.com/tlylt/danger-demo/actions/runs/4201699300/jobs/7288964524#step:4:13))
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.