question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] YN0018 in github actions when using TypeScript

See original GitHub issue

Describe the bug

yarn install fails with on GitHub actions but not locally with YN0018

  • yarn cache clean --all did not help
  • updating yarn to latest did not help
  • updating yarn to sources did not help

Also tried:

/D/p/m/typescript-to-proptypes (master|✔) $ yarn -v
2.0.0-rc.31.git.20200327.c2902096
~/D/p/m/typescript-to-proptypes (master|✔) $ yarn cache clean --all
➤ YN0000: Done in 0.07s
~/D/p/m/typescript-to-proptypes (master|✔) $ set -x YARN_CHECKSUM_BEHAVIOR update
~/D/p/m/typescript-to-proptypes (master|✔) $ yarn

which did not change anything. The install did take quite a while though. It seemed to be frozen after it downloaded everything.

To Reproduce

  1. Clone https://github.com/merceyz/typescript-to-proptypes
  2. yarn install
  3. works fine
  4. same commit fails in github actions: https://github.com/merceyz/typescript-to-proptypes/runs/547813870

Screenshots

https://github.com/merceyz/typescript-to-proptypes/runs/550247915#step:5:3273

Environment if relevant (please complete the following information):

  • GitHub runner version 2.165.2 using ubuntu-latest

Additional context

Seems related to typescript 3.5.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:24 (16 by maintainers)

github_iconTop GitHub Comments

121reactions
arcaniscommented, Apr 1, 2020

My best guess is that this is due to this change, committed a few weeks ago: https://github.com/yarnpkg/berry/blob/master/packages/plugin-patch/sources/patchUtils.ts#L143

It slightly changed the patch mechanism with regard to line endings to make it more consistent, but unfortunately it was already too late and I should have bumped the cache version since the old one wasn’t compatible with the new one anymore.

To workaround this, try the following:

  • yarn cache clean --all

At this point, running yarn install should start to fail. Then run this:

  • YARN_CHECKSUM_BEHAVIOR=update yarn

It’ll update the lockfile with the new cache checksums.

9reactions
joshhansencommented, Jul 21, 2021

I get this with Yarn 2 on Github CI but only with a git repo dependency:

https://github.com/LearnSomethingTeam/mathjs.git#commit=3c3048bedb39db7352bec75846ed6e8a04b9f862

“The remote archive doesn’t match the expected checksum”

I do use Typescript

When I set YARN_CHECKSUM_BEHAVIOR=update the CI build succeeds, but I’d really rather not use that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Marketplace Actions TypeScript Error Reporter - GitHub
This action uses the TypeScript Compiler API to run a static type check on your code and display the results of the check....
Read more >
YN0018 error with some git URL modules version >= yarn-3.2 ...
Self-service I'd be willing to implement a fix Describe the bug I have some dependencies specified git url like: "dependencies": ...
Read more >
Creating a typescript project with yarn appears broken #43839
It appears the issue is related to yarn . Describe the Bug. It's as if @types/react is not installed. JSX element implicitly has...
Read more >
[Bug?]: Can't run tsc (& other) · Issue #4665 · yarnpkg/berry
yarn init -2 yarn add --dev typescript yarn install yarn tsc # nope! Environment. The command doesn't work. Same error ...
Read more >
Create a JavaScript Action using TypeScript - GitHub
Create a TypeScript Action with tests, linting, workflow, publishing, and versioning - GitHub - actions/typescript-action: Create a TypeScript Action with ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found