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
7.46k stars 10.31k forks source link

【严重】部署错误 #2783

Open Phillweston opened 2 days ago

Phillweston commented 2 days ago

描述遇到的问题 NotionNext部署错误,信息如下:

  1. 错误1

    [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve '@swc/counter' in 
    '/vercel/path0/node_modules/@swc/helpers'
  2. 错误2

    ReferenceError: SignUpForm is not defined

相应配置

解决方法:

  1. themes/starter/index.js文件中添加一个import导入包的代码
    import { SignUpForm } from './components/SignUpForm'
  2. package.json文件中的dependencies列表中添加一个@swc/counter库的代码
     "dependencies": {
    "@clerk/localizations": "^3.0.4",
    "@clerk/nextjs": "^5.1.5",
    "@headlessui/react": "^1.7.15",
    "@next/bundle-analyzer": "^12.1.1",
    "@swc/counter": "^0.1.3",
    "@vercel/analytics": "^1.0.0",
    "algoliasearch": "^4.18.0",
    "axios": "^1.7.2",
    "feed": "^4.2.2",
    "js-md5": "^0.7.3",
    "lodash.throttle": "^4.1.1",
    "memory-cache": "^0.2.0",
    "next": "14.2.4",
    "notion-client": "6.15.6",
    "notion-utils": "6.16.0",
    "react": "^18.3.1",
    "react-dom": "^18.2.0",
    "react-facebook": "^8.1.4",
    "react-hotkeys-hook": "^4.5.0",
    "react-notion-x": "6.16.0",
    "react-share": "^4.4.1",
    "react-tweet-embed": "~2.0.0"
    },
Phillweston commented 2 days ago

@tangly1024

W4ddl3 commented 2 days ago

建议标题改为:

【严重 BUG】 Starter 主题无法正常部署