monkey-master
monkey-master copied to clipboard
关于deno run后出现的报错
(base) myfile@wendeMacBook-Pro monkey-master % deno run --allow-read --allow-write --allow-net --allow-run index.js Download https://esm.x-static.io/v12/[email protected]/esnext/lib/esm/puppeteer/web.js.js error: Import 'https://esm.x-static.io/v12/[email protected]/esnext/lib/esm/puppeteer/web.js.js' failed: 403 Forbidden Imported from "https://esm.sh/puppeteer-core/lib/esm/puppeteer/web.js:2"
那个,我没找到在哪替换,我看到download那行后缀有两个.js我就感觉不对劲儿,想找代码来着- -没找到 OqO阿巴阿巴
啊!找到了!在browser.js里面!谢谢大佬!
替换browser.js中的源之后,出现 Check file:///Users/myfile/gitclone/monkey-master/index.js error: TS2578 [ERROR]: Unused '@ts-expect-error' directive. // @ts-expect-error Chrome still supports behavior: instant but ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js:266:21
TS2578 [ERROR]: Unused '@ts-expect-error' directive. // @ts-expect-error Chrome still supports behavior: instant but ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ at https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js:284:21
Found 2 errors. 是不是换源之后还需要进行一些其他的更改呀?
sorry 这个版本有坑 需要 run with no-check
好的,我试试,谢谢
发现新的源还是有问题,新的源报错信息中这个js文件https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js 有两处使用了// @ts-expect-error注释 经过查阅:
// @ts-expect-error注释。如果我们在代码行之前将此注释作为前缀放置,TypeScript将不会报告错误。但是,如果没有错误,TypeScript将告知我们的代码中有不必要的注释,如下所示:Unused '@ts-expect-error' directive。 然后导致运行报错OpO
发现新的源还是有问题,新的源报错信息中这个js文件https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js 有两处使用了// @ts-expect-error注释 经过查阅:
// @ts-expect-error注释。如果我们在代码行之前将此注释作为前缀放置,TypeScript将不会报告错误。但是,如果没有错误,TypeScript将告知我们的代码中有不必要的注释,如下所示:Unused '@ts-expect-error' directive。 然后导致运行报错OpO
大佬遇到这种情况过吗?
发现时deno版本的问题,brew install deno,我朋友装的1.6.0版本完全没问题,我也brew install deno,他就给我装了1.4.9有毒
https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js
有两处使用了// @ts-expect-error注释
导致报错 如何解决?
https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js 有两处使用了// @ts-expect-error注释 导致报错 如何解决?
当场自闭,一直没继续弄
https://unpkg.com/[email protected]/lib/esm/puppeteer/common/JSHandle.js 有两处使用了// @ts-expect-error注释 导致报错 如何解决?
更新deno版本,见上条关于版本的描述,我能正常运行了,但是又有其他报错,我就不弄了,而且显卡现在都需要和茅台一样提前预约那种抢购方式了,不买了,不当猴子了