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
7 Replies
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...
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.
Without module declarations:
Solution
Update to @sapphire/ts-config v5 and follow the upgrading guide
Which guide?
None of the ones on the website apply
Nvm fixed it
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)