Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cloudflare-pages-cn.md #3183

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Update cloudflare-pages-cn.md #3183

merged 1 commit into from
Nov 8, 2023

Conversation

hekbobo
Copy link
Contributor

@hekbobo hekbobo commented Nov 8, 2023

cloudflare构建命令 (2023/11/8 验证部署成功)

cloudflare 构建命令
@Yidadaa Yidadaa merged commit deca9bf into ChatGPTNextWeb:main Nov 8, 2023
@Ylarod
Copy link

Ylarod commented Nov 14, 2023

14:30:29.890 | ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project.
-- | --
14:30:29.890 | ⚡️
14:30:29.890 | ⚡️ 	The following routes were not configured to run with the Edge Runtime:
14:30:29.890 | ⚡️ 	  - /api/cors/[...path]
14:30:29.890 | ⚡️
14:30:29.890 | ⚡️ 	Please make sure that all your non-static routes export the following edge runtime route segment config:
14:30:29.891 | ⚡️ 	  export const runtime = 'edge';
14:30:29.891 | ⚡️
14:30:29.891 | ⚡️ 	You can read more about the Edge Runtime on the Next.js documentation:
14:30:29.891 | ⚡️ 	  https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes
14:30:29.891 |  
14:30:29.930 | Failed: Error while executing user command. Exited with error code: 1
14:30:29.940 | Failed: build command exited with code: 1
14:30:30.944 | Failed: error occurred while running build command

Solved by:
image

@hekbobo
Copy link
Contributor Author

hekbobo commented Nov 14, 2023 via email

@Ylarod
Copy link

Ylarod commented Nov 14, 2023

你好,可以检查下配置是否和我的一样? 昨天晚上自动部署是成功的, [image: image.png] [image: image.png] [image: image.png] Ylarod @.> 于2023年11月14日周二 14:45写道:

我这边无法构建,方便看看是哪里出问题了吗 @hekbobo https://github.com/hekbobo 14:30:29.890 | ⚡️ ERROR: Failed to produce a Cloudflare Pages build from the project. -- | -- 14:30:29.890 | ⚡️ 14:30:29.890 | ⚡️ The following routes were not configured to run with the Edge Runtime: 14:30:29.890 | ⚡️ - /api/cors/[...path] 14:30:29.890 | ⚡️ 14:30:29.890 | ⚡️ Please make sure that all your non-static routes export the following edge runtime route segment config: 14:30:29.891 | ⚡️ export const runtime = 'edge'; 14:30:29.891 | ⚡️ 14:30:29.891 | ⚡️ You can read more about the Edge Runtime on the Next.js documentation: 14:30:29.891 | ⚡️ https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes 14:30:29.891 | 14:30:29.930 | Failed: Error while executing user command. Exited with error code: 1 14:30:29.940 | Failed: build command exited with code: 1 14:30:30.944 | Failed: error occurred while running build command — Reply to this email directly, view it on GitHub <#3183 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJQ55OPCDHGM5ANJWMOFWDYEMHSHAVCNFSM6AAAAAA7CSCGVKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBZGYZTCNZVG4 . You are receiving this because you were mentioned.Message ID: @.
>

已经解决了,代码中的 nodejs 替换成 edge 就可以了。

@hekbobo
Copy link
Contributor Author

hekbobo commented Nov 14, 2023 via email

@ccinoo
Copy link

ccinoo commented Nov 16, 2023

我遇到的是如下报错:
2023-11-16T04:11:18.419159Z Cloning repository... 2023-11-16T04:11:19.477852Z From https://github.com/***/ChatGPT-Web 2023-11-16T04:11:19.478543Z * branch 5d0f5c1738ff4c2c013c2762cbc5ea16e7393ac9 -> FETCH_HEAD 2023-11-16T04:11:19.478752Z 2023-11-16T04:11:19.612279Z HEAD is now at 5d0f5c1 Merge branch 'main' of https://github.com/Yidadaa/ChatGPT-Next-Web 2023-11-16T04:11:19.612968Z 2023-11-16T04:11:19.734974Z 2023-11-16T04:11:19.769077Z Success: Finished cloning repository files 2023-11-16T04:11:20.401932Z Installing dependencies 2023-11-16T04:11:20.411046Z Python version set to 2.7 2023-11-16T04:11:23.715016Z Downloading and installing node v20.1.0... 2023-11-16T04:11:24.050749Z Downloading https://nodejs.org/dist/v20.1.0/node-v20.1.0-linux-x64.tar.xz... 2023-11-16T04:11:24.439252Z Computing checksum with sha256sum 2023-11-16T04:11:24.584257Z Checksums matched! 2023-11-16T04:11:30.118893Z Now using node v20.1.0 (npm v9.6.4) 2023-11-16T04:11:30.469065Z Started restoring cached build plugins 2023-11-16T04:11:30.478528Z Finished restoring cached build plugins 2023-11-16T04:11:30.919685Z Attempting ruby version 2.7.1, read from environment 2023-11-16T04:11:32.609969Z Using /opt/buildhome/.rvm/gems/ruby-2.7.1 2023-11-16T04:11:33.707466Z Using PHP version 7.4 2023-11-16T04:11:33.805306Z 5.2.5 is already installed. 2023-11-16T04:11:33.82318Z Using Swift version 5.2.5 2023-11-16T04:11:33.823839Z Started restoring cached node modules 2023-11-16T04:11:33.835855Z Finished restoring cached node modules 2023-11-16T04:11:33.843388Z Started restoring cached yarn cache 2023-11-16T04:11:33.855861Z Finished restoring cached yarn cache 2023-11-16T04:11:33.880945Z Installing yarn at version 1.22.19 2023-11-16T04:11:33.900255Z �[37mInstalling Yarn!�[0m 2023-11-16T04:11:33.900621Z �[36m> Downloading tarball...�[0m 2023-11-16T04:11:33.930954Z 2023-11-16T04:11:33.931308Z [1/2]: https://yarnpkg.com/downloads/1.22.19/yarn-v1.22.19.tar.gz --> /tmp/yarn.tar.gz.yR5F6L9CEe 2023-11-16T04:11:33.932094Z % Total % Received % Xferd Average Speed Time Time Time Current 2023-11-16T04:11:33.933373Z Dload Upload Total Spent Left Speed 2023-11-16T04:11:34.025967Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 81 100 81 0 0 861 0 --:--:-- --:--:-- --:--:-- 870 2023-11-16T04:11:34.137437Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 94 100 94 0 0 458 0 --:--:-- --:--:-- --:--:-- 1362 2023-11-16T04:11:34.364925Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 2023-11-16T04:11:34.513095Z 100 1215k 100 1215k 0 0 2091k 0 --:--:-- --:--:-- --:--:-- 2091k 2023-11-16T04:11:34.513574Z 2023-11-16T04:11:34.513815Z [2/2]: https://yarnpkg.com/downloads/1.22.19/yarn-v1.22.19.tar.gz.asc --> /tmp/yarn.tar.gz.yR5F6L9CEe.asc 2023-11-16T04:11:34.514223Z % Total % Received % Xferd Average Speed Time Time Time Current 2023-11-16T04:11:34.514593Z Dload Upload Total Spent Left Speed 2023-11-16T04:11:34.563749Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 100 85 100 85 0 0 1734 0 --:--:-- --:--:-- --:--:-- 1734 2023-11-16T04:11:34.587855Z 100 98 100 98 0 0 1342 0 --:--:-- --:--:-- --:--:-- 1342 2023-11-16T04:11:34.72863Z 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 2023-11-16T04:11:34.803164Z 100 833 100 833 0 0 2892 0 --:--:-- --:--:-- --:--:-- 2892 2023-11-16T04:11:34.8153Z �[36m> Verifying integrity...�[0m 2023-11-16T04:11:34.846187Z gpg: Oops: lock already held by us 2023-11-16T04:11:34.855817Z gpg: Signature made Tue 10 May 2022 07:48:23 PM UTC 2023-11-16T04:11:34.856127Z gpg: using RSA key 6D98490C6F1ACDDD448E45954F77679369475BAA 2023-11-16T04:11:34.858757Z gpg: Good signature from "Yarn Packaging <[email protected]>" [unknown] 2023-11-16T04:11:34.860958Z gpg: WARNING: This key is not certified with a trusted signature! 2023-11-16T04:11:34.8612Z gpg: There is no indication that the signature belongs to the owner. 2023-11-16T04:11:34.861358Z Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 2023-11-16T04:11:34.8615Z Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 2023-11-16T04:11:34.863388Z �[32m> GPG signature looks good�[0m 2023-11-16T04:11:34.863617Z �[36m> Extracting to ~/.yarn...�[0m 2023-11-16T04:11:34.942317Z �[36m> Adding to $PATH...�[0m 2023-11-16T04:11:34.95763Z �[36m> We've added the following to your /opt/buildhome/.bashrc 2023-11-16T04:11:34.957984Z > If this isn't the profile of your current shell then please add the following to your correct profile: 2023-11-16T04:11:34.958287Z 2023-11-16T04:11:34.958465Z export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" 2023-11-16T04:11:34.958585Z �[0m 2023-11-16T04:11:35.334023Z �[32m> Successfully installed Yarn 1.22.19! Please open another terminal where the yarn command will now be available.�[0m 2023-11-16T04:11:35.710944Z Installing NPM modules using Yarn version 1.22.19 2023-11-16T04:11:37.112128Z yarn install v1.22.19 2023-11-16T04:11:37.202849Z [1/4] Resolving packages... 2023-11-16T04:11:37.452289Z [2/4] Fetching packages... 2023-11-16T04:12:11.082479Z [3/4] Linking dependencies... 2023-11-16T04:12:28.741963Z [4/4] Building fresh packages... 2023-11-16T04:12:28.78018Z $ husky install 2023-11-16T04:12:28.917038Z husky - Git hooks installed 2023-11-16T04:12:28.926516Z Done in 51.82s. 2023-11-16T04:12:28.973283Z NPM modules installed using Yarn 2023-11-16T04:12:29.297453Z Installing Hugo 0.54.0 2023-11-16T04:12:30.016642Z Hugo Static Site Generator v0.54.0-B1A82C61A/extended linux/amd64 BuildDate: 2019-02-01T10:04:38Z 2023-11-16T04:12:30.019862Z Started restoring cached go cache 2023-11-16T04:12:30.034671Z Finished restoring cached go cache 2023-11-16T04:12:30.130892Z go version go1.14.4 linux/amd64 2023-11-16T04:12:30.146149Z go version go1.14.4 linux/amd64 2023-11-16T04:12:30.151933Z Installing missing commands 2023-11-16T04:12:30.152256Z Verify run directory 2023-11-16T04:12:30.152446Z Executing user command: npx https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230 --experimental-minify 2023-11-16T04:12:32.251149Z npm ERR! code E404 2023-11-16T04:12:32.252723Z npm ERR! 404 Not Found - GET https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230 2023-11-16T04:12:32.252991Z npm ERR! 404 2023-11-16T04:12:32.253273Z npm ERR! 404 'https://prerelease-registry.devprod.cloudflare.dev/next-on-pages/runs/4930842298/npm-package-next-on-pages-230' is not in this registry. 2023-11-16T04:12:32.253451Z npm ERR! 404 This package name is not valid, because 2023-11-16T04:12:32.253584Z npm ERR! 404 1. name can only contain URL-friendly characters 2023-11-16T04:12:32.253733Z npm ERR! 404 2023-11-16T04:12:32.253974Z npm ERR! 404 Note that you can also install from a 2023-11-16T04:12:32.254111Z npm ERR! 404 tarball, folder, http url, or git url. 2023-11-16T04:12:32.257179Z 2023-11-16T04:12:32.257893Z npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2023-11-16T04_12_30_814Z-debug-0.log 2023-11-16T04:12:32.275261Z Failed: build command exited with code: 1 2023-11-16T04:12:33.245937Z Failed: error occurred while running build command

spongeBor pushed a commit to spongeBor/ChatGPT-Next-Web that referenced this pull request Jan 18, 2024
gaogao1030 pushed a commit to gaogao1030/ChatGPT-Next-Web that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants