esm.sh icon indicating copy to clipboard operation
esm.sh copied to clipboard

Integrity check failure - rehype-autolink-headings

Open scarf005 opened this issue 11 months ago • 3 comments

error: Integrity check failed for remote specifier. The source code is invalid, as it does not match the expected hash in the lock file.

  Specifier: https://esm.sh/[email protected]
  Actual: 4009a644df3747fde5e6d7aab05d16e61d99ae734cabc8273436ceabc91e1e62
  Expected: 66d11d07f8e5cc477b261c80652bf3004706408c6016712a160cc83149a2c04a

This could be caused by:
  * the lock file may be corrupt
  * the source itself may be corrupt

Investigate the lockfile; delete it to regenerate the lockfile or --reload to reload the source code from the server.
Error: Process completed with exit code 10.

run from: https://github.com/scarf005/blog/actions/runs/12991847927/job/36230347471 deno version: 2.1.7 lockfile: https://github.com/scarf005/blog/blob/7586e1af1040367306a75073ab767e34c5b589cd/deno.lock#L1612

scarf005 avatar Jan 27 '25 15:01 scarf005

Whatever the difference to the source code is, it has caused an issue with the tape package:

import test from "https://esm.sh/[email protected]"; // fails with exception below
import test from 'https://esm.sh/[email protected]?pin=v135' // works
error: Uncaught (in promise) TypeError: i(...).functionsHaveConfigurableNames is not a function
    at https://esm.sh/[email protected]/denonext/mock-property.mjs:3:905
    at https://esm.sh/[email protected]/denonext/mock-property.mjs:3:452
    at https://esm.sh/[email protected]/denonext/mock-property.mjs:3:4251

tjconcept avatar Jan 27 '25 19:01 tjconcept

Potentially related: I noticed that https://esm.sh/[email protected] suddenly stopped working, and upon investigation found it imports this: /lib0@^0.2.98/array?target=es2022 which in turn has these imports:

/* esm.sh - [email protected]/array */
import "/[email protected]/es2022/array.m";
export * from "/[email protected]/es2022/array.mjs";

The array.m should be set.mjs I think. If I add ?pin=v135 then it's fixed:

/* esm.sh - [email protected]/array */
import "/v135/[email protected]/es2022/set.js";
export * from "/v135/[email protected]/es2022/array.js";

Not exactly sure if esm.sh is the root cause of the issue here, but the issue does seem to at least be "surfaced" by the recent esm.sh update.

josephrocca avatar Jan 27 '25 22:01 josephrocca

Also, this works:

let CBOR = await import(`https://esm.sh/[email protected]?pin=v135`);

But if I remove the ?pin=v135 I get:

Uncaught ReferenceError: __Buffer$ is not defined

josephrocca avatar Jan 31 '25 08:01 josephrocca