【发布时间】:2018-02-01 10:04:06
【问题描述】:
这是 github 仓库 - https://github.com/jasonhodges/ngx-gist
当我运行打包命令时
rimraf dist && tsc -p tsconfig-esm.json && rollup -c rollup.config.js dist/ngx-gist.module.js > dist/ngx-gist.bundle.js && cp package.json dist && ts-node tools/cleanup.ts && ngc && cp README.md dist
我收到以下错误 -
/usr/lib/nodejs/typescript/tsc.js:37290
var jsonOptions = json["compilerOptions"];
TypeError: Cannot read property 'compilerOptions' of undefined
如何解决这个错误?
更新
编译器选项
{
"compilerOptions": {
"target": "es5",
"module": "es2015",
"sourceMap": true,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"stripInternal": true,
"declaration": true,
"outDir": "./dist",
"lib": ["es2015", "dom"]
},
"files": [
"./lib/ngx-gist.module.ts"
]
}
【问题讨论】:
标签: node.js angular npm node-modules