Closed lucis closed 1 year ago
Update, after fixing the problems locally, my Deploy is failing with this:
@ije if there's anyway we could help, we'd love to know how. We've been using your service for a few months now with generally no hiccups — until Sunday. Any big recent changes in architecture or infrastructure?
Thanks, i am looking into it.
@ije if there's anyway we could help, we'd love to know how. We've been using your service for a few months now with generally no hiccups — until Sunday. Any big recent changes in architecture or infrastructure?
i updated the CDN last weekend by adding edge worker to speed up the service, that may break something i don't know.
@lucis not sure what happened, seems everything works fine for me now... can you please try again?
@ije sorry, I already deployed manual changes that fixed the problem. I supposed I could go back but, as you said, these seem like intermittent problems happening with esm. These were the changes I made ~1 hour ago:
@rjsf/core
dependency from 100 to 99.@preact/signals
's version from 1.1.2 to 1.0.3 (This was never an issue, no idea why did it stop working)@preact/signals-corr
's version from 1.1.2 to 1.0.1 (This was never an issue, no idea why did it stop working)nanoid
entry to the import_map
(We had this setup before, but realized that @rjsf/core
output JS was suddenly importing from "/v100/nanoid@3.3.4"
instead of from "nanoid"
. Because of a problems with this specific version, we had to manually add an import_map entry like this: "https://esm.sh/v100/nanoid@3.3.4": "https://esm.sh/v100/nanoid@4.0.0"
. I think that the behavior was changed again with esm and we needed to undo our fixes from yesterday)@ije would there be a possibility of us sponsoring this project and getting a meeting session with you so we can understand better what's happening here?
@lucis thanks! or could you please give me a minimum code base i can debug?
@ije the 429 is intermittent, now my deploy is failing because of Too Many Requests for the Preact module
I've invited you to the repo in question. Let me know other ways we can help.
Maybe it could be related to how you pin versions. I noticed you are adding /BUILD_VERSION/
to the front of your pathname but the documentation says to do ?pin=BUILD_VERSON
. I'm not sure if it makes a difference though.
Worth trying as an alternative
Sent via Superhuman iOS @.***>
On Tue, Dec 27 2022 at 12:00 PM, Kyle June @.***> wrote:
Maybe it could be related to how you pin versions. I noticed you are adding /BUILD_VERSION/ to the front of your pathname but the documentation says to do ?pin=BUILD_VERSON. I'm not sure if it makes a difference though.
— Reply to this email directly, view it on GitHub https://github.com/ije/esm.sh/issues/477#issuecomment-1365964361, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOZ3WAWEITKWWYSOS7RGTWPMAA5ANCNFSM6AAAAAATKLSRXI . You are receiving this because you commented.Message ID: <ije/esm. @.***>
I think this issue should be fixed, but I'd also recommend vendoring your dependencies so that even if the site where they are hosted goes down, your app will continue to work fine.
We are looking into precisely that right now :) struggling a bit with how import maps are generated by deno vendor
Sent via Superhuman iOS @.***>
On Tue, Dec 27 2022 at 12:19 PM, Kyle June @.***> wrote:
I think this issue should be fixed, but I'd also recommend vendoring your dependencies so that even if the site where they are hosted goes down, your app will continue to work fine.
— Reply to this email directly, view it on GitHub https://github.com/ije/esm.sh/issues/477#issuecomment-1365977391, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMOZ3UMVM5PPWFUHGLEZNTWPMCHJANCNFSM6AAAAAATKLSRXI . You are receiving this because you commented.Message ID: <ije/esm. @.***>
Use your current import map as an argument for the vendor command and update your deno.jsonc file to use the import map in your vendor directory. The generated vendor import map should contain all your import mappings in it.
Yes, I'm just struggling with this:
➜ deco git:(lucis/use-pin-for-esm) ✗ deno vendor dev.ts main.ts
Vendored 1716 modules into vendor/ directory.
Updated your local Deno configuration file with a reference to the new vendored import map at vendor/import_map.json. Invoking Deno subcommands will now automatically resolve using the vendored modules. You may override this by providing the `--import-map <other-import-map>` flag or by manually editing your Deno configuration file.
➜ deco git:(lucis/use-pin-for-esm) ✗ s
rm: deno.lock: No such file or directory
Task start deno run -A --watch=static/ dev.ts
Watcher Process started.
The manifest has been generated for 29 routes, 19 islands and 11 sections.
Githooks setup successfully: pre-commit
error: Uncaught (in promise) TypeError: Relative import path "preact/jsx-runtime" not prefixed with / or ./ or ../ and not in import map from "file:///Users/guilherme/Projects/deco/deco/routes/live/team/[team].tsx"
at file:///Users/guilherme/Projects/deco/deco/routes/live/team/[team].tsx:1:1
await import(entrypointHref);
^
at async dev (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/live@0.3.29/dev.ts:75:3)
at async file:///Users/guilherme/Projects/deco/deco/dev.ts:4:1
Watcher Process finished. Restarting on file change...
Apparently the compiler options weren't considered.
Yeah, I've had to manually add "preact/jsx-runtime": "./esm.sh/preact@10.11.3/jsx-runtime.js",
for it to work (and then there was a tabbable
import with a trailing slash also, had to trim it... weird)
Now I'm having framework specific problems, seems like fresh
is not so happy to be vendored, perhaps because it does funny stuff with your local files for automatic building...
Task start deno run -A --watch=static/ dev.ts
Watcher Process started.
The manifest has been generated for 29 routes, 19 islands and 11 sections.
Githooks setup successfully: pre-commit
Starting live middleware: siteId=1 site=deco
Listening on http://localhost:8000/
Page with path "/live" not found
[302]: 3391ms /live
[200]: 30ms /login
✘ [ERROR] [plugin deno] Module not found "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/src/runtime/main_dev.ts".
✘ [ERROR] [plugin deno] Module not found "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/plugins/twind/main.ts".
deno:data:application/javascript,import hydrate from "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/plugins/twind/main.ts";import options from "file:///Users/guilherme/Projects/deco/deco/twind.config.ts";export default function(state) { hydrate(options, state); }:1:20:
1 │ import hydrate from "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/plugins/twind/main.ts";import options from "file:///Users/guilherme/Projects/...
╵ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
An error occurred during route handling or page rendering. Error: Build failed with 2 errors:
error: Module not found "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/src/runtime/main_dev.ts".
deno:data:application/javascript,import hydrate from "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/plugins/twind/main.ts";import options from "file:///Users/guilherme/Projects/deco/deco/twind.config.ts";export default function(state) { hydrate(options, state); }:1:20: ERROR: [plugin: deno] Module not found "file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/fresh@1.1.2/plugins/twind/main.ts".
at failureErrorWithLog (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1601:15)
at file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1243:28
at runOnEndCallbacks (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1023:63)
at buildResponseToResult (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1241:7)
at file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1354:14
at file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:655:9
at handleIncomingPacket (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:752:9)
at readFromStdout (file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:621:7)
at file:///Users/guilherme/Projects/deco/deco/vendor/deno.land/x/esbuild@v0.14.51/mod.js:1880:11
Just to report, last ~12h were smooth, deployments generally working again.
Just to report, last ~12h were smooth, deployments generally working again.
Since I added a front layer with CF worker at edge for v100 update, that may break the cache for preview builds. Now the CDN has faster response speed and cache hit ratio, the new builds should work fine!
i am going to close this, free to open if needs thanks
Hey @ije, first of all: thanks for your work,
esm.sh
is an amazing tool!Today, I've started getting these errors in Deno Deploy, where 500 is returned for assets (Fresh app):
If I try to run locally (after clearing cache), I get different errors:
Are we doing something wrong here? Do you recommend changing the strategy? Here's our import_map (after some crazy fixes for errors that were happening yesterday)