uni-app error while parsing tsconfig.json

oyxsuwqo  于 2021-11-27  发布在  Java
关注(0)|答案(2)|浏览(391)

09:44:19.929 正在编译中...
09:44:31.723 Module build failed (from ./node_modules/ts-loader/index.js):
09:44:31.733 Error: error while parsing tsconfig.json
09:44:31.734 at Object.loader (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/ts-loader/dist/index.js:19:18)
09:44:31.742 [tsl] ERROR
09:44:31.743 TS18002: The 'files' list in config file 'tsconfig.json' is empty.
09:44:31.764 ERROR Build failed with errors.

gr8qqesn

gr8qqesn1#

一样的问题,源码并没有改动,就升级了Hbuilder。

pvcm50d1

pvcm50d12#

在根目录下添加tsconfig.json解决。

{
    "compilerOptions": {
        "module": "commonjs",
        "noImplicitAny": true,
        "removeComments": true,
        "preserveConstEnums": true,
        "sourceMap": true
    },
    "files": [
        "core.ts",
        "sys.ts",
        "types.ts",
        "scanner.ts",
        "parser.ts",
        "utilities.ts",
        "binder.ts",
        "checker.ts",
        "emitter.ts",
        "program.ts",
        "commandLineParser.ts",
        "tsc.ts",
        "diagnosticInformationMap.generated.ts"
    ]
}

相关问题