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.

Yarn offline-mirror: Integrity check failed for "@preact/compat"

See original GitHub issue

Hi! My team is migrating one of the packages in a monorepo to Preact. The monorepo uses yarn offline-mirror. The package that we are migrating uses Next.js.

Reproduction

When we run the following command in terminal:

yarn workspace [package name] add next-plugin-preact preact preact-render-to-string react-ssr-prepass@npm:preact-ssr-prepass react@npm:@preact/compat react-dom@npm:@preact/compat

This is the output:

yarn workspace v1.22.4
yarn add v1.22.4
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error https://registry.yarnpkg.com/@preact/compat/-/compat-0.0.3.tgz: Integrity check failed for "@preact/compat" (computed integrity doesn't match our records, got "sha512-z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg== sha1-2jmj7l5rSw0yVb/vlWAYkK/YBwk=")
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
error Command failed.
Exit code: 1
Command: /usr/local/bin/node
Arguments: /Users/lindsay.bloom/.yarn/lib/cli.js add next-plugin-preact preact preact-render-to-string react-ssr-prepass@npm:preact-ssr-prepass react@npm:@preact/compat react-dom@npm:@preact/compat
Directory: [deleted for privacy purposes]
Output:

If I try running the command a second time, there is no error.

Expected Behavior

There should be no error when running the command the first time.

Actual Behavior

The https://registry.yarnpkg.com/@preact/compat/-/compat-0.0.3.tgz tarball causes build issues as well. The tarball never gets properly added to the npm-packages-offline-cache directory, which then causes build errors in CI/CD when trying to install dependencies.

Here’s a screenshot of the error: Screen Shot 2020-11-19 at 11 09 40 AM

Thanks so much in advance!

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
arcaniscommented, Nov 20, 2020

This bug isn’t present in 2.x; integrity hashes are now kept for the full package locator.

0reactions
JoviDeCroockcommented, Jun 17, 2022

Closing as this was related to yarn and the way the next-plugin-preact advises installation😅

Read more comments on GitHub >

github_iconTop Results From Across the Web

Running Yarn offline | Yarn Blog
“Offline mirror” is different from cache that both npm CLI and Yarn have. ... these urls are unreachable during your build, it will...
Read more >
How to solve "Integrity check failed for 'websocket-driver'" error ...
You can try clearing the cache and updating the checksums in the yarn.lock file by running the following commands. yarn cache clean yarn ......
Read more >
CHANGELOG.md - Come Join My Journey
Custom CSS: Removing compatibility checks and files for sites running WordPress ... Editor: update icon sizing in the Jetpack sidebar for consistency.
Read more >
sitemap.xml - codeburst
... 2018-01-17 monthly 1.0 https://codeburst.io/tagged/failure 2017-07-09 ... 1.0 https://codeburst.io/mysql-triggers-for-data-integrity-in-lieu-of-check- ...
Read more >
run code anywhere - Trinket
... CONSISTENCES CONSISTENCIES CONSISTENCY CONSISTENT CONSISTENTLY CONSISTING ... CONTRIVERS CONTRIVES CONTRIVING CONTROL CONTROLLABILITY CONTROLLABLE ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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