octokit / octokit.js

The all-batteries-included GitHub SDK for Browsers, Node.js, and Deno.
MIT License
6.94k stars 1.02k forks source link

`deno run` dependencies with `Requires authentication` #2341

Closed mr-kelly closed 1 year ago

mr-kelly commented 1 year ago

Please avoid duplicates

Reproducible test case

import { Octokit } from "https://cdn.skypack.dev/octokit?dts";

Please select the environment(s) that are relevant to your bug report

Version

import { Octokit } from "https://cdn.skypack.dev/octokit?dts";

What happened?

image image

As the picture show.

This is a new problem today..

I run same script success 12 hours ago.

error: Uncaught (in promise) HttpError: Requires authentication
      const error = new RequestError(toErrorMessage(data), status, {
                    ^
    at https://cdn.skypack.dev/-/@octokit/request@v6.2.1-nNBYVdjyDnH6n0gpygNS/dist=es2019,mode=imports/optimized/@octokit/request.js:81:21
    at async Job.doExecute (https://cdn.skypack.dev/-/bottleneck@v2.19.5-WnyfIkTTdKNNPUEySJVJ/dist=es2019,mode=imports/unoptimized/light.js:354:20)

Would you be interested in contributing a fix?

mr-kelly commented 1 year ago

still error until now

gr2m commented 1 year ago

Can you please test if you see the error with when using @octokit-next/core?

You can use https://esm.sh/ which I think is what the Deno folks recommend: https://esm.sh/@octokit-next/core@2.6.0

@octokit-next/* is not production ready, but it's a native ESM and built with Deno compatibility in mind.

mr-kelly commented 1 year ago

Can you please test if you see the error with when using @octokit-next/core?

You can use https://esm.sh/ which I think is what the Deno folks recommend: https://esm.sh/@octokit-next/core@2.6.0

@octokit-next/* is not production ready, but it's a native ESM and built with Deno compatibility in mind.

what you mean, should i import from esm.sh? @gr2m

import { Octokit } from "https://esm.sh/octokit?dts";

I encounter same problem yet.

image
mr-kelly commented 1 year ago

Can you please test if you see the error with when using @octokit-next/core?

You can use https://esm.sh/ which I think is what the Deno folks recommend: https://esm.sh/@octokit-next/core@2.6.0

@octokit-next/* is not production ready, but it's a native ESM and built with Deno compatibility in mind.

I found that this problem will appear under my macOS (M1) native deno.

Success with docker run -it --init denoland/deno:1.23.1 deno run

gr2m commented 1 year ago

I was not able to reproduce the problem with my M1 machine, using Deno 1.26.1 and Deno 1.27.1 (latest version)

// test.js
import { Octokit } from "https://cdn.skypack.dev/octokit?dts";

and then run with

deno run test.js
gr2m commented 1 year ago

@mr-kelly did you find out what the problem was?

mr-kelly commented 1 year ago

@mr-kelly did you find out what the problem was?

sorry...no... i switch to NodeJS and give up the Deno version @gr2m