Giter Site home page Giter Site logo

Comments (12)

spencerwooo avatar spencerwooo commented on July 22, 2024

preview 的时候我可以获取到代码
worker.txt

不太理解你这里具体要干什么。

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

不好意思,确实是我说的不太清楚orz
我那句话的意思是我发现我wrangler preview之后本地多出来一个文件\dist\workers.js,是publish到cloudflare的代码,就顺便研究了下…………
和我问的问题没关系orz(贴上workers.js是觉得说不定会对解决问题有帮助orz)

我出现的问题是preview和publish的时候就会白屏,报错:
Uncaught SyntaxError: Unexpected token < in JSON at position 1
Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 1
Uncaught (in response) SyntaxError: Unexpected token < in JSON at position 1

from onedrive-cf-index.

spencerwooo avatar spencerwooo commented on July 22, 2024

是你自定义代码出现的问题,和本项目并无太大关系,我这边提供不了太大帮助,建议使用 eslint 查看修改之后的代码语法问题。

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

eslint检查出来有几千个语法错误,但是并没有上述的错误。
这个代码不是我自定义的,是我wrangler preview之后出现的,我以为是这个项目自动生成的,如果不是的话我想请问下如果您可以正常打开网站的话,您的js文件是什么样子的。

from onedrive-cf-index.

spencerwooo avatar spencerwooo commented on July 22, 2024

我的意思是用 eslint 检查 src 路径下的代码,不是构建之后生成的这个文件。这个文件是一个 minified 文件,就是会出现很多 eslint 问题,但这是预期现象,也不是问题的关键。关键在于你自己使用 eslint 找到 src 文件夹中的错误代码。

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

我检查了好几遍,src 文件夹中并没有错误代码,包括所有的代码我都没有发现问题。

非常抱歉给您带来了麻烦,希望您有时间的时候能再想一下问题可能出现在哪里。
您的项目非常有趣,并不是oneindex那种古板的风格,所以我才费了好几天的时间想把它做好。
非常感谢!

from onedrive-cf-index.

spencerwooo avatar spencerwooo commented on July 22, 2024

抱歉,但是目前的线索我确实无法定位具体问题所在。

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

如果您需要线索的话,这是我所有的代码,全部存放在C:\Users\dell.wrangler文件夹里 :有时间您可以看一下。

如果您觉得很麻烦又太忙就算了,我再想别的办法,就不打扰了。

from onedrive-cf-index.

spencerwooo avatar spencerwooo commented on July 22, 2024

你这里面包含有你的 API Token 和其他非常多的敏感内容,我建议你删掉……

from onedrive-cf-index.

spencerwooo avatar spencerwooo commented on July 22, 2024

并且我确实没看到可能出现错误的地方,我建议你重新部署一下,然后使用 yarn 而不是 npm 来进行依赖安装,同时 wrangler 也不要直接下载 exe 放在当前目录下而是用 yarn global add @cloudflare/wrangler 来将其安装到系统 $PATH 路径下。

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

你这里面包含有你的 API Token 和其他非常多的敏感内容,我建议你删掉……

感谢建议……疏忽了

并且我确实没看到可能出现错误的地方,我建议你重新部署一下,然后使用 yarn 而不是 npm 来进行依赖安装,同时 wrangler

也不要直接下载 exe 放在当前目录下而是用 yarn global add @cloudflare/wrangler 来将其安装到系统 $PATH 路径下。
我确实是用命令行yarn global add @cloudflare/wrangler安装的,而且我在系统路径下也找到了对应的路径(至于我文件夹里的exe文件。。我也不知道是什么时候,怎么出现的……)
我又重新检查了获取的client_id之类的,命令行也重新敲了一遍,重新部署也没有发现问题……真的枯了

from onedrive-cf-index.

accelerate12138 avatar accelerate12138 commented on July 22, 2024

您好,还是打扰一下,如果您可以成功部署这个网站的话,我想看下您的worker.js,和我的比对一下,看能不能发现问题。这个worker.js里面似乎有个人的网站信息,您可以提前删掉敏感信息再发送……
我目前只能想到这个办法了,希望您可以帮下忙,我不想就这么放弃orz

from onedrive-cf-index.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.