最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Creating new js Octokit object for Github stopped to work - Stack Overflow

programmeradmin2浏览0评论

I cannot run octokit for GitHub in my application. It was working for long time but stopped. The error is

Uncaught SyntaxError: The requested module '/@octokit/webhooks-methods@^5.0.0?target=es2022' does not provide an export named 'verifyWithFallback' (at index.js:476:10)

I removed the things of the application to get the minimal application causing the error:

index.html

<script type="module">
    import myFunc from "./myFunc.js";
</script>

myFunc.js

import {Octokit, App} from ";;
new Octokit({
    auth: 'ghp_1234512345123451234512345'
});
const myFunc = ()=>"foo";
export default myFunc;

Before I did some things with git locally: clone, reset, push. Maybe that was the reason. I also changed the token to the new one, in GitHub and in my application. How to fix the error?

I cannot run octokit for GitHub in my application. It was working for long time but stopped. The error is

Uncaught SyntaxError: The requested module '/@octokit/webhooks-methods@^5.0.0?target=es2022' does not provide an export named 'verifyWithFallback' (at index.js:476:10)

I removed the things of the application to get the minimal application causing the error:

index.html

<script type="module">
    import myFunc from "./myFunc.js";
</script>

myFunc.js

import {Octokit, App} from "https://esm.sh/octokit";
new Octokit({
    auth: 'ghp_1234512345123451234512345'
});
const myFunc = ()=>"foo";
export default myFunc;

Before I did some things with git locally: clone, reset, push. Maybe that was the reason. I also changed the token to the new one, in GitHub and in my application. How to fix the error?

Share Improve this question edited Jan 31 at 20:01 trzczy asked Jan 31 at 19:54 trzczytrzczy 1,5012 gold badges21 silver badges46 bronze badges
Add a comment  | 

2 Answers 2

Reset to default 0

This should be put

import {Octokit} from "https://esm.sh/@octokit/[email protected]";

Have same prblem here but we import octokit by cdn for a long time, don't know why it failed recently

import { Octokit } from 'https://esm.sh/octokit'

发布评论

评论列表(0)

  1. 暂无评论