将Nextjs应用程序部署到firebase托管时出现意外错误

zhte4eai  于 2023-05-17  发布在  其他
关注(0)|答案(1)|浏览(152)

我正在尝试将Nextjs应用程序部署到firebase托管,我已经按照documentation的说明进行了操作,然后运行以下命令:

firebase deploy --only hosting

我得到了这个错误

环境

系统:macOS ventura 13.3.1
国家预防机制:9.5.1
节点:18.16.0
Firebase-cli:11.16.0

Firebase.json

{
  "hosting": {
    "source": "hosting",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}

Package.json

{
  "private": true,
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  },
  "dependencies": {
    "next": "latest",
    "react": "^18.2.0",
    "react-dom": "^18.2.0"
  },
  "devDependencies": {
    "@types/node": "^17.0.43",
    "@types/react": "^18.0.12",
    "@types/react-dom": "^18.0.5",
    "typescript": "^4.7.3"
  }
}

任何帮助都非常感谢。

s2j5cfk0

s2j5cfk01#

我通过将firebase-cli升级到版本11.29.1解决了这个问题

相关问题