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

部署错误 #2777

Open Armyh opened 3 days ago

Armyh commented 3 days ago

这次拉取更新后,直接报错,全部删除重新拉去部署一样报错。

123

环境

Armyh commented 3 days ago

我用的Gitbook主题,应该有问题,最初我更新就是在Gitbook主题,更新失败,搞了搞没弄明白。就删掉了所有从新部署,但还是一直部署不成功

Azir-11 commented 2 days ago

我也遇到了同样的问题:

image image
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

请参考这个issue #2783