"Cannot find type definition file for 'probe-types'" when migrating from 7.5.1
I updated ProbeJS in one of my Minecraft instances from 7.5.1 to 7.7.2. After the dump was finished, when opening the .minecraft folder in VS Code and opening one of the JS files, VS Code reports the following error in jsconfig.json:
[{
"resource": "[...]/.minecraft/kubejs/startup_scripts/jsconfig.json",
"owner": "typescript",
"severity": 8,
"message": "Cannot find type definition file for 'probe-types'.\n The file is in the program because:\n Entry point for implicit type library 'probe-types'",
"source": "ts",
"startLineNumber": 1,
"startColumn": 1,
"endLineNumber": 1,
"endColumn": 2,
"origin": "extHost1"
}]
Error message:
Cannot find type definition file for 'probe-types'.
The file is in the program because:
Entry point for implicit type library 'probe-types'
Despite the error, the typing in VS Code appears to work as normal. The offending jsconfig.json looks like this:
{
"compilerOptions": {
"module": "none",
"target": "ES2015",
"lib": [
"ES5",
"ES2015",
"ES2016.Array.Include",
"ES2017.Object"
],
"rootDir": ".",
"typeRoots": [
"../../.probe/startup/probe-types",
"../../.probe/packages",
"../../.probe/startup"
],
"baseUrl": "../../.probe/packages",
"skipLibCheck": true,
"moduleResolution": "node",
"allowJs": true,
"checkJs": false,
"disableSizeLimit": true,
"noEmit": true,
"assumeChangesOnlyAffectDirectDependencies": true,
"skipDefaultLibCheck": true
},
"include": [
"./**/*.js",
"./**/*.ts",
null
]
}
~The error goes away when I remove the jsconfig.json and let it regnenerate by /probejs dump.~ EDIT: I noticed that deleting jsconfig.json is not enough, I have to delete the .probe folder and /probejs dump for the error to go away. The "../../.probe/startup/probe-types" in "typeRoots" is not present in a freshly generated jsconfig.json.
Versions: Minecraft 1.21.1, KubeJS 2101.7.2-build.295, ProbeJS 7.7.2 (previously 7.5.1), ProbeJS VS Code extension 0.0.2, VSCodium 1.105.17075