Yarn offline-mirror: Integrity check failed for "@preact/compat"
See original GitHub issueHi! 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:
Thanks so much in advance!
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This bug isn’t present in 2.x; integrity hashes are now kept for the full package locator.
Closing as this was related to yarn and the way the next-plugin-preact advises installation😅