我的服务器.ts
文件抱怨找不到模块和打字,但我安装了模块并检查了node_modules
。
这是我的项目结构:screenshot
我得到的错误:screenshot
tsconfig.json
:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings"
],
"filesGlob": [
"**/*.ts",
"typings/main",
"./typings/index.d.ts"
]
}
答案 0 :(得分:0)
filesGlob
我的建议是删除filesGlob部分,因为它看起来你实际上并不需要它,而是:
{
"compilerOptions": {
"module": "commonjs",
"moduleResolution": "node",
"target": "es5",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/browser.d.ts",
"typings/browser/**"
]
}
希望这有帮助。