部署在Cloudflare 尝试失败,待解决

type
status
date
slug
summary
category
tags
password
icon
  1. Select repository
  1. Set up builds and deployments
  1. Deploy site

Set up builds and deployments

Configure automatic builds and deployments for
notion image
Project name notionnext
Production branch main
Pushes to this branch automatically trigger deployments to the Production environment. Pushes to all other branches will trigger deployments within the Preview environment.
notion image
notion image
 
  1. 因为 cf-support 才支持部署到`Cloudflare`, 生产分支需要选择 cf-support 分支
  1. 框架预设选项选择Next.js, 只需要填写正确构建命令即可
    1. 构建命令: npm run export
      构建输出目录: out
  1. 环境变量设置, 需要设置
    1. NOTION_PAGE_ID={你的Notion Page ID} 这个填你自己的Notion PageID, 如果不清楚, 则去看文档, 这里不赘述
      NODE_VERSION=16 设置构建时使用NODE版本
      VERCEL_ENV=production 这个环境变量决定是否把文章静态渲染出来, 如果没有则部署完无法查看文章内容, 会显示博客文章404
An unknown error occurred. Please try again later.
An unknown error occured. Contact your account team or Cloudflare support: https://cfl.re/3WgEyrH. (Code: 8000000)
notion image
2023-03-22T16:18:48.147546Z Cloning repository... 2023-03-22T16:18:49.125043Z From https://github.com/zoozlezhou/NotionNext 2023-03-22T16:18:49.125665Z * branch edbe3916ab5326384fb220f4261621ae8f5d7737 -> FETCH_HEAD 2023-03-22T16:18:49.125862Z 2023-03-22T16:18:49.304439Z HEAD is now at edbe391 Update blog.config.js 2023-03-22T16:18:49.305030Z 2023-03-22T16:18:49.467480Z 2023-03-22T16:18:49.494761Z Success: Finished cloning repository files 2023-03-22T16:18:50.222876Z Installing dependencies 2023-03-22T16:18:50.234336Z Python version set to 2.7 2023-03-22T16:18:53.692346Z Downloading and installing node v16.19.1... 2023-03-22T16:18:54.133615Z Downloading https://nodejs.org/dist/v16.19.1/node-v16.19.1-linux-x64.tar.xz... 2023-03-22T16:18:54.570295Z Computing checksum with sha256sum 2023-03-22T16:18:54.701116Z Checksums matched! 2023-03-22T16:18:59.118006Z Now using node v16.19.1 (npm v8.19.3) 2023-03-22T16:18:59.503631Z Started restoring cached build plugins 2023-03-22T16:18:59.517891Z Finished restoring cached build plugins 2023-03-22T16:19:00.034336Z Attempting ruby version 2.7.1, read from environment 2023-03-22T16:19:03.855178Z Using ruby version 2.7.1 2023-03-22T16:19:04.232529Z Using PHP version 5.6 2023-03-22T16:19:04.405180Z 5.2 is already installed. 2023-03-22T16:19:04.436370Z Using Swift version 5.2 2023-03-22T16:19:04.437078Z Started restoring cached node modules 2023-03-22T16:19:04.455327Z Finished restoring cached node modules 2023-03-22T16:19:04.980369Z Installing NPM modules using NPM version 8.19.3 2023-03-22T16:19:05.413080Z npm WARN config tmp This setting is no longer used. npm stores temporary files in a special 2023-03-22T16:19:05.413447Z npm WARN config location in the cache, and they are managed by 2023-03-22T16:19:05.413628Z npm WARN config cacache. 2023-03-22T16:19:05.835799Z npm WARN config tmp This setting is no longer used. npm stores temporary files in a special 2023-03-22T16:19:05.836259Z npm WARN config location in the cache, and they are managed by 2023-03-22T16:19:05.836421Z npm WARN config cacache. 2023-03-22T16:19:08.492647Z npm ERR! code ERESOLVE
 

已知问题

  1. 因为没解决`react-messenger-customer-chat`依赖无法正常安装的问题, 所以删掉了该依赖和相关的组件(FacebookMessenger), 因此部署后的博客将不支持这一扩展. 因为我不使用Facebook, 所以这一修改对我没影响.
  1. 部署在Cloudflare, 因为是纯静态的, 导致站内的搜索功能不可用, 会一直404, 这个应该可以解决, 有空研究下.
  1. Cloudflare Page的在大陆的可访问性未知, 可能存在无法连接或者加载速度慢的问题
 
参考:
上一篇
添加 Twikoo 评论系统 尝试失败 原因未知
下一篇
zoom白板
Loading...
2024-12-1
最新发布
PDF文件下载
2025-4-19
记一次不是很规范的关闭服务器停电维护
2025-4-18
记一次Dell EMC R740 磁盘亮黄灯故障事件报障开单和处理过程(续)
2025-4-18
记一次Dell EMC R740 磁盘亮黄灯故障事件报障开单和处理过程
2025-4-18
拓展坞导致显示器黑屏的全面解决方案
2025-4-17
安全警告:不受信任的服务器证书 由于无法验证证书, Zoom Rooms无法连接到 zoom.com.cn(签发者: DigiCert Global G2 TLS RSA SHA256 2020 CA1,错误代码:5
2025-4-17