我已经使用 MEVN Stack 完成了一个任务列表,一切都很好,直到我尝试将其上传到 Heroku 上。尽管我尝试更新“typescript”、猫鼬等,但我收到此错误。我不知道该怎么做。这是我的文件。在我的本地主机中,一切正常,早些时候我收到了无法找到“morgan”、“cors”和“mongoose”模块的错误,但只需将我的 devDep 与我的依赖项交换就是我需要做的一切。
就像我说的,我尝试更新我的打字稿,猫鼬,看起来这不是问题。
"dependencies": {
"@types/mongoose": "^5.11.97",
"axios": "^0.27.2",
"bootswatch": "^5.2.1",
"core-js": "^3.8.3",
"cors": "^2.8.5",
"mongoose": "^6.6.4",
"morgan": "^1.10.0",
"vue": "^3.2.13",
"vue-router": "^4.0.13"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-typescript": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-typescript": "^9.1.0",
"eslint": "^7.32.0",
"eslint-plugin-vue": "^8.0.3",
"typescript": "~4.5.5"
},
"engines": {
"node": "16.x",
"npm": "8.x"
}
Run Code Online (Sandbox Code Playgroud)
tsconfig
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": true,
"jsx": "preserve",
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true, …Run Code Online (Sandbox Code Playgroud)