nickchen120235
nickchen120235
DDeno
Created by nickchen120235 on 2/23/2024 in #help
How to use private remote modules hosted on GitHub on Deno Deploy?
Can confirm caching does not work if the environment variable is not set
$ deno cache --reload ./utils/module.ts
error: Module not found "https://raw.githubusercontent.com/path/to/module.ts".
at file:///home/me/my-project/utils/module.ts:23:8
$ deno cache --reload ./utils/module.ts
error: Module not found "https://raw.githubusercontent.com/path/to/module.ts".
at file:///home/me/my-project/utils/module.ts:23:8
6 replies
DDeno
Created by nickchen120235 on 2/23/2024 in #help
How to use private remote modules hosted on GitHub on Deno Deploy?
This is how I import my module in my code
import { load } from 'dotenv'

await load({ export: true })
const GH_AUTH_TOKEN = Deno.env.get('GH_AUTH_TOKEN')
if (GH_AUTH_TOKEN)
Deno.env.set('DENO_AUTH_TOKENS', GH_AUTH_TOKEN)

export {
MyClass1
} from 'https://raw.githubusercontent.com/path/to/module.ts'
import { load } from 'dotenv'

await load({ export: true })
const GH_AUTH_TOKEN = Deno.env.get('GH_AUTH_TOKEN')
if (GH_AUTH_TOKEN)
Deno.env.set('DENO_AUTH_TOKENS', GH_AUTH_TOKEN)

export {
MyClass1
} from 'https://raw.githubusercontent.com/path/to/module.ts'
6 replies
DDeno
Created by nickchen120235 on 2/23/2024 in #help
How to use private remote modules hosted on GitHub on Deno Deploy?
I think it fails during caching when deploying?
6 replies
DDeno
Created by nickchen120235 on 2/23/2024 in #help
How to use private remote modules hosted on GitHub on Deno Deploy?
No description
6 replies