satyarohith / sift

Sift is a routing and utility library for Deno Deploy.
https://deno.land/x/sift
MIT License
170 stars 14 forks source link

0.3.4 broken #66

Closed wezm closed 2 years ago

wezm commented 2 years ago

I was using version 0.3.4 in a small application via: https://deno.land/x/sift@0.3.4/mod.ts. This imports the following:

import {  contentType as getContentType,  lookup,} from "https://raw.githubusercontent.com/usesift/media_types/34656bf398c81f2687fa5010e56844dac4e7a2e9/mod.ts";

but that returns 404. The solution is probably to update to a newer version of sift but I wanted to note this because ideally previously published versions would continue working.

satyarohith commented 2 years ago

Hi @wezm, thanks for opening the issue. Deno introduced deno vendor command to handle these problems.

You can use deno vendor on your final application. It will cache all the dependencies into a folder that you can commit to git.

Note: deno vendor uses import maps. You can deploy the application only using "GitHub Actions" (https://deno.com/deploy/docs/projects#git-integration) mode at the moment as import maps are not supported on "Automatic" mode.

wezm commented 2 years ago

Ok thanks @satyarohith I'll give that a go.