Open Armyh opened 3 days ago
我用的Gitbook主题,应该有问题,最初我更新就是在Gitbook主题,更新失败,搞了搞没弄明白。就删掉了所有从新部署,但还是一直部署不成功
我也遇到了同样的问题:
描述遇到的问题 NotionNext部署错误,信息如下:
错误1
[webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Can't resolve '@swc/counter' in
'/vercel/path0/node_modules/@swc/helpers'
错误2
ReferenceError: SignUpForm is not defined
相应配置
解决方法:
themes/starter/index.js
文件中添加一个import导入包的代码
import { SignUpForm } from './components/SignUpForm'
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"
},
请参考这个issue #2783
这次拉取更新后,直接报错,全部删除重新拉去部署一样报错。
环境