Issue with Sapphire Update

error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node16'. TS Config
{
"extends": "@sapphire/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"tsBuildInfoFile": "dist/.tsbuildinfo"
},
"include": ["src"],
"declaration": false,
"declarationMap": false
}
{
"extends": "@sapphire/ts-config",
"compilerOptions": {
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true,
"tsBuildInfoFile": "dist/.tsbuildinfo"
},
"include": ["src"],
"declaration": false,
"declarationMap": false
}
Solution:
Update to @sapphire/ts-config v5 and follow the upgrading guide
Jump to solution
7 Replies
dayflare
dayflare9mo ago
Whenever I change or set the resolution or module property I get the errors linked to this post. https://www.answeroverflow.com/m/1098702395694911609
Answer Overflow
Problem since upgrading to latest sapphirejs and TS 5.0 - Sapphire ...
After upgrading to the latest version of sapphire, it is raining errors like "ESM syntax is not allowed in a CommonJS module when 'verbatimModuleSyntax' is enab...
dayflare
dayflare9mo ago
Whenever I leave the module line blank (as the post says), I get the initial Node16 error I linked above. Either way, nothing will compile or even run in dev environment.
dayflare
dayflare9mo ago
No description
dayflare
dayflare9mo ago
Without module declarations:
No description
No description
Solution
Favna
Favna9mo ago
Update to @sapphire/ts-config v5 and follow the upgrading guide
dayflare
dayflare9mo ago
Which guide? None of the ones on the website apply Nvm fixed it
Favna
Favna9mo ago
the one linked in the breaking changes changelog of v5 and bundled in the package going forward. Always refer to a changelog file or releases tab when upgrading to a new major of a library, whichever they provide (and if they provide none then the library sucks)