这是我的package.json:
{
"name": "edge-node-api",
"version": "1.0.0",
"description": "Edge Electrons customers web API",
"main": "api.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "http://192.168.0.50:3000/lem/edge-node-api.git"
},
"author": "lem",
"license": "ISC",
"dependencies": {
"body-parser": "^1.17.2",
"bull": "^3.0.0-alpha.4",
"del": "^2.2.2",
"express": "^4.15.3",
"fm-log": "^4.4.3",
"lodash": "^4.17.4",
"memcached": "^2.2.2",
"moment": "^2.18.1",
"morgan": "^1.8.2",
"njwt": "^0.4.0",
"pg": "^6.2.2",
"redis": "^2.7.1",
"vali-date": "^1.0.0"
},
"devDependencies": {
"@types/bull": "^2.1.0",
"@types/node": "^7.0.22",
"api-doc": "^4.0.0",
"gulp": "^3.9.1",
"gulp-develop-server": "^0.5.2",
"gulp-sequence": "^0.4.6",
"gulp-typescript": "^3.1.7",
"typescript": "^2.3.3",
"typings": "^2.1.1"
}
}
这是我的tsconfig.json:
{
"compilerOptions": {
"module": "commonjs",
"target": "es2017",
"sourceMap": true,
"removeComments": true,
"outDir": "dist"
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
这是我的typings.json:
{
"devDependencies": {
"body-parser": "registry:npm/body-
parser#1.15.2+20161116154925",
"debug": "registry:npm/debug#2.0.0+20170504163145",
"express": "registry:npm/express#4.14.0+20170217205433",
"gulp": "registry:npm/gulp#4.0.0-alpha.2+20160817105618",
"lodash": "registry:npm/lodash#4.0.0+20161015015725",
"memcached": "registry:dt/memcached#2.2.0+20170324151803",
"morgan": "registry:dt/morgan#1.7.0+20160726064905",
"pg": "registry:npm/pg#6.0.2+20170314174547",
"redis": "registry:npm/redis#2.6.0+20160901110043"
},
"dependencies": {},
"globalDevDependencies": {
"bull": "registry:dt/bull#2.1.2+20170221033156"
}
}
我错过了什么吗?
答案 0 :(得分:1)
我刚刚删除了
“包括”:[ “SRC / ** / *。TS” ],
来自tsconfig.json的并且有效。