Getting back to my Jovo3 project (still trying to find time to move it to Jovo4)…
As you probably don’t remember, I was finding that “jovo3 build” and “jovo3 deploy” were failing to generate the bundle.zip file. The workaround I was given was to explicitly execute “npm run bundle”.
That’s now giving me many TS1110 (Type expected) errors in library modules when it executes “tsc --p .tsconfig-build.json”. For example,
node_modules/@types/express-serve-static-core/index.d.ts:99:68 - error TS1110: Type expected.
99 type RemoveTail<S extends string, Tail extends string> = S extends `${infer P}${Tail}` ? P : S;
~~~
I’ve tried deleting the .tscconfig-build.json and letting “npm run bundle” recreate it. No improvement.
The generated file is:
{
"compilerOptions": {
"lib": [
"es2020"
],
"allowUnreachableCode": false,
"declaration": true,
"esModuleInterop": true,
"module": "commonjs",
"noImplicitAny": true,
"noImplicitReturns": true,
"outDir": "./dist/",
"preserveConstEnums": true,
"removeComments": false,
"sourceMap": true,
"strict": true,
"target": "es2020",
"resolveJsonModule": true
},
"include": [
"./src/**/*",
"./test/**/*"
],
"exclude": [
"./dist/**/*",
"./node_modules/**/*",
"test/**/*"
]
}
Windiff says the only difference between that and my own tsconfig.json is some whitespace and the addition of “test/**/*” to the exclude section. I wouldn’t have thought that either of those would cause this error.
It looks like “bundle” is defined as the script
“gulp --gulpfile node_modules/jovo-framework/gulpfile.js build-ts --cwd ./”
I should be up to date on all modules and javascript and so on.
So what obvious mistake am I making?