tangly1024 / NotionNext

使用 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.)
https://tangly1024.com
MIT License
6.46k stars 8.94k forks source link

【部署错误】更改任意配置,就会报错 #2427

Open Yogayu opened 1 month ago

Yogayu commented 1 month ago

描述遇到的问题 简单说明你遇到的问题,相关的日志、错误信息

主要更改了config文件的任意配置,就会报错,例如更改theme:

info - Linting and checking validity of types... 14:39:17.088 info - Creating an optimized production build... 14:39:17.317 [默认主题] /vercel/path0/themes/NEXT_PUBLIC_THEME 14:39:29.412 Failed to compile. 14:39:29.412
14:39:29.413 ./themes/theme.js 14:39:29.413 Module not found: Can't resolve '@theme-components' 14:39:29.413
14:39:29.413 https://nextjs.org/docs/messages/module-not-found 14:39:29.413
14:39:29.413 Import trace for requested module: 14:39:29.418 ./pages/404.js 14:39:29.419
14:39:29.419
14:39:29.419 > Build failed because of webpack errors 14:39:29.564 error Command failed with exit code 1. 14:39:29.564 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. 14:39:29.580 Error: Command "yarn run build" exited with 1 14:39:30.043

相应配置 相关的配置,例如notion_page_id;你的网站地址

截图 相关的页面,应该用结果

环境

tangly1024 commented 1 month ago

主题名配置有误, 正确应该是英文小写,例如 hexo ,heo,next,simple等等。 你的日志显示,主题名称为 NEXT_PUBLIC_THEME

[默认主题] /vercel/path0/themes/NEXT_PUBLIC_THEME