publish error different on CI

I run this command:
pnpm exec deno publish --dry-run --unstable-sloppy-imports --allow-dirty
pnpm exec deno publish --dry-run --unstable-sloppy-imports --allow-dirty
on my local project and in the CI. local I don't get any error but the CI(github action) shows some typescript errors like: TS7053 [ERROR]...... both run the same deno version 2.5.4 and I had the problem early: What could I do to get Deno to produce the same errors in both environments?
3 Replies
fry69
fry69•2d ago
Does the same thing happen if you use the setup-deno action use deno publish directly like this? ->
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
cache: true

- name: Publish package
run: deno publish
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v2
with:
cache: true

- name: Publish package
run: deno publish
fast&fear< 🔥
fast&fear< 🔥OP•2d ago
i will try give me some minutes Sorry for asking you --- I found that the difference is that in the common(non CI), there is a tsconfig, in the CI case, there is no.
fry69
fry69•2d ago
You should be able to move relevant tsconfig.json stuff into deno.json under compilerOptions, see here -> https://docs.deno.com/runtime/reference/ts_config_migration/#ts-compiler-options

Did you find this page helpful?