在过去的 2 天里,我一直在尝试让我的项目构建在 DO 应用程序上。 有趣的是,项目中没有任何变化,突然间它突然开始崩溃并出现错误:
[2023-04-06 09:03:02] │ It looks like you're trying to use TypeScript but do not have the required package(s) installed.
[2023-04-06 09:03:02] │
[2023-04-06 09:03:02] │ Please install typescript by running:
[2023-04-06 09:03:02] │
[2023-04-06 09:03:02] │ yarn add --dev typescript
[2023-04-06 09:03:02] │
[2023-04-06 09:03:02] │ If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your pages directory).
[2023-04-06 09:03:02] │
我们试图做的就是重新启动(强制重新部署和构建),然后它开始抛出这个错误。
同时我们的 staging 分支工作得很好,两者的包版本是相同的。
"dependencies": {
"next": "^12.0.7",
"react": "17.0.2",
"react-dom": "17.0.2",
},
"devDependencies": {
"@types/node": "^18.11.9",
"@types/react": "^18.0.33",
"ts-node": "^10.9.1",
"typescript": "^5.0.3",
}
附言我什至试图恢复到过去已经成功部署的旧工作提交,但它也失败了。