使用 NextJS + Notion API 实现的,支持多种部署方案的静态博客,无需服务器、零门槛搭建网站,为Notion和所有创作者设计。 (A static blog built with NextJS and Notion API, supporting multiple deployment options. No server required, zero threshold to set up a website. Designed for Notion and all creators.)
在vercel的deploy页面出现错误:“Error: Command "yarn run build" exited with 1” 日志如下:
‘[20:50:28.995] Cloning github.com/Bssn520/NotionNext2 (Branch: main, Commit: 81da5ae) [20:50:29.133] Previous build cache not available [20:50:29.788] Cloning completed: 792.31ms [20:50:29.968] Running "vercel build" [20:50:30.526] Vercel CLI 28.14.1 [20:50:30.908] Installing dependencies... [20:50:31.286] yarn install v1.22.17 [20:50:31.345] info No lockfile found. [20:50:31.357] [1/4] Resolving packages... [20:50:37.568] warning react-notion-x > react-use > nano-css > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead [20:50:38.586] warning valine > leancloud-storage > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [20:50:38.640] warning valine > leancloud-storage > leancloud-realtime > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. [20:50:38.649] warning valine > leancloud-storage > superagent@3.8.3: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases. [20:50:38.749] warning valine > leancloud-storage > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau [20:50:39.199] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent@5.3.1: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at https://github.com/visionmedia/superagent/releases. [20:50:39.203] warning valine > leancloud-storage > leancloud-realtime > @leancloud/platform-adapters-node > @leancloud/adapters-superagent > superagent > formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau [20:50:39.824] warning @waline/client > vue > @vue/compiler-sfc > magic-string > sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead [20:50:42.056] [2/4] Fetching packages... [20:51:20.420] [3/4] Linking dependencies... [20:51:20.423] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react@0.13.x || 0.14.x || 15.x.x". [20:51:20.423] warning "gitalk > react-flip-move@2.9.14" has incorrect peer dependency "react-dom@0.13.x || 0.14.x || 15.x.x". [20:51:20.424] warning " > qrcode.react@1.0.1" has incorrect peer dependency "react@^15.5.3 || ^16.0.0 || ^17.0.0". [20:51:20.424] warning " > react-cusdis@2.1.3" has incorrect peer dependency "react@^17.0.0". [20:51:20.424] warning " > react-cusdis@2.1.3" has incorrect peer dependency "react-dom@^17.0.0". [20:51:20.425] warning "react-facebook > react-spinner-children@1.0.8" has incorrect peer dependency "react@15.x || 16.x". [20:51:20.425] warning " > react-messenger-customer-chat@0.8.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0-0 || ^16.0.0-0". [20:51:20.426] warning "react-notion-x > react-image@4.0.3" has unmet peer dependency "@babel/runtime@>=7". [20:51:20.426] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react@^15 || ^16". [20:51:20.426] warning "react-notion-x > react-lazy-images@1.1.0" has incorrect peer dependency "react-dom@^15 || ^16". [20:51:20.429] warning "react-notion-x > react-lazy-images > react-intersection-observer@6.4.2" has incorrect peer dependency "react@^15.0.0 || ^16.0.0 || ^17.0.0". [20:51:20.429] warning "react-notion-x > react-pdf > file-loader@6.2.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". [20:51:20.429] warning " > use-ackee@3.0.1" has incorrect peer dependency "react@^17.0.0". [20:51:20.431] warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > tsutils@3.21.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". [20:51:36.221] [4/4] Building fresh packages... [20:51:36.727] success Saved lockfile. [20:51:36.735] Done in 65.46s. [20:51:36.797] Detected Next.js version: 13.1.6 [20:51:36.798] Running "yarn run build" [20:51:37.023] yarn run v1.22.17 [20:51:37.086] $ next build [20:51:37.474] info - Loaded env from /vercel/path0/.env.local [20:51:37.798] Attention: Next.js now collects completely anonymous telemetry regarding usage. [20:51:37.799] This information is used to shape Next.js' roadmap and prioritize features. [20:51:37.799] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: [20:51:37.800] https://nextjs.org/telemetry [20:51:37.800] [20:51:37.962] info - Linting and checking validity of types... [20:51:42.474] info - Creating an optimized production build... [20:51:57.557] Failed to compile. [20:51:57.557] [20:51:57.558] ./blog.config.js [20:51:57.558] Error: [20:51:57.558] [31mx[0m Expression expected [20:51:57.558] ,-[[36;1;4m/vercel/path0/blog.config.js[0m:7:1] [20:51:57.558] [2m 7[0m | THEME: process.env.NEXT_PUBLIC_THEME || 'hexo', // 主题, 支持 ['next','hexo',"fukasawa','medium','example'] @see https://preview.tangly1024.com [20:51:57.559] [2m 8[0m | THEME_SWITCH: process.env.NEXT_PUBLIC_THEME_SWITCH || false, // 是否显示切换主题按钮 [20:51:57.559] [2m 9[0m | LANG: 'zh-CN', // e.g 'zh-CN','en-US' see /lib/lang.js for more. [20:51:57.559] [2m10[0m | SINCE: , // e.g if leave this empty, current year will be used. [20:51:57.559] : [31;1m ^[0m [20:51:57.559] [2m11[0m | APPEARANCE: 'light', // ['light', 'dark', 'auto'], // light 日间模式 , dark夜间模式, auto根据时间和主题自动夜间模式 [20:51:57.559] [2m12[0m | [20:51:57.560] [2m13[0m | AUTHOR: 'Bssn007', // 作者 [20:51:57.560] `---- [20:51:57.560] [20:51:57.560] Caused by: [20:51:57.560] Syntax Error [20:51:57.560] [20:51:57.560] Import trace for requested module: [20:51:57.560] ./blog.config.js [20:51:57.560] [20:51:57.561] [20:51:57.561] > Build failed because of webpack errors [20:51:57.598] error Command failed with exit code 1. [20:51:57.599] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. [20:51:57.621] Error: Command "yarn run build" exited with 1’
相应配置 相关的配置,例如notion_page_id;你的网站地址
截图 相关的页面,应该用结果
环境