我正在创建TypeScript Lambda,当我使用Gulp构建它时,收到了标题中提到的错误。由于编译器选项和排除项未知,因此gulp无法将tsconfig中的规则应用于其构建过程
我试图更新到最新的TS版本,并在tsconfig中寻找拼写错误/错别字,但一切看起来都很好。
这是我的package.json文件:
if(_procFunc == true){
Func1();
}
这是我的tsconfig.json文件:
{
"config": {
"appId": "your-app-id-here",
"serviceDiscoveryId": "1E642470-AB82-4AA5-944D-075D68CDFA26"
},
"dependencies": {
"aws-lambda-router": "^0.2.3",
"aws-sdk": "^2.524.0",
"natives": "^1.1.6",
"request-promise": "^4.2.4"
},
"devDependencies": {
"@types/aws-lambda": "^8.10.31",
"@types/es6-promise": "^3.3.0",
"@types/jest": "22.2.3",
"@types/node": "^10.14.17",
"@types/request-promise": "^4.1.44",
"gulp": "^3.9.1",
"gulp-typescript": "^5.0.1",
"husky": "^1.3.1",
"jest": "^22.4.3",
"prettier": "1.12.1",
"ts-jest": "^22.4.6",
"tslint": "^5.19.0",
"typescript": "^3.1.1"
},
"husky": {
"hooks": {
"pre-push": "npm run pretty && npm run lint && npm run test:coverage"
}
},
"jest": {
"transform": {
"^.+\\.tsx?$": "ts-jest"
},
"testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(tsx?)$",
"moduleFileExtensions": [
"ts",
"tsx",
"js",
"jsx",
"json",
"node"
]
},
"scripts": {
"build": "gulp --allowjs --resolveJsonModule",
"lint": "tslint --project tsconfig.json --exclude **/node_modules/**/* --exclude **/*.spec.ts",
"lint-fix": "tslint --fix --project tsconfig.json --exclude **/node_modules/**/*",
"pretty": "prettier --write \"./**/*.ts\"",
"test": "jest",
"test:coverage": "jest --coverage"
},
"description": "",
"license": "ISC",
"main": "index.js",
"name": "lambda-typescript-template",
"version": "1.0.0"
}