Closed johnstonmatt closed 1 year ago
sorry for the extension change, can you please update the lock file? i changed it to .mjs
to fix conflict entry name and i made a mistake of purging the build cache of < v116, now all the builds have been stored into CF R2/works kv as immutable.
after using deno cache main.ts --reload --lock-write
I got:
./main_test.ts (uncaught error)
error: SyntaxError: The requested module '/v117/@kwsites/file-exists@1.1.1/X-ZHN2LzAuMTczLjA/deno/file-exists.mjs' does not provide an export named 'exists'
at <anonymous> (https://esm.sh/v117/simple-git@3.15.1/X-ZC9Aa3dzaXRlcy9maWxlLWV4aXN0c0AxLjEuMQpkc3YvMC4xNzMuMA/deno/simple-git.bundle.mjs:2:163)
This error was not caught from a test and caused the test runner to fail on the referenced module.
It most likely originated from a dangling promise, event/timeout handler or top-level code.
when running the module, the .mjs extension seems to have broken the deps
I declared for simple-git
:
export { simpleGit } from "https://esm.sh/v117/simple-git@3.15.1?no-dts&target=deno&deno-std=0.173.0&bundle&deps=@kwsites/file-exists@1.1.1";
just checked, the file-exists
index module(cjs) has a non-standard export syntax which can not be parsed correctly by the cjs-lexer
, i will fix this (by adding it to the requireModeAllowList
or fixing the cjs-lexer)
https://github.com/esm-dev/esm.sh/blob/168149158105370e4f4895d1b67c31b6c71162b2/server/consts.go#L52
Problem
My deno program now fails to build in CI when it pulls down fresh modules instead of using the cache on my machine. I think the reason I get
is because a week ago my
resolved to
and now it resolves to
Note the difference between the file extensions, js -> mjs. This causes a failure to match the lock file.
I am also seeing this with a separate import:
Additional info