OfficeDev / teams-toolkit

Developer tools for building Teams apps
Other
462 stars 190 forks source link

Error when building typescript bot templates: error TS1452: 'resolution-mode' assertions are only supported when `moduleResolution` is `node16` or `nodenext`. #12430

Open yukun-dong opened 1 month ago

yukun-dong commented 1 month ago

Describe the bug The bot templates may show below error when running npm build: error TS1452: 'resolution-mode' assertions are only supported when moduleResolution is node16 or nodenext.

Screenshots image

Why this error happens This error may be related to msal-node/msal-common package https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/7284, which is the dependency of bot-builder package. We are still investigating this.

Workaround Choose 1 or 2.

  1. Update typescript to above 5.3.0.
  2. Explicitly set @azure/msal-node package to be version 2.13.1 and @azure/msal-common package to be version 14.14.2 .
microsoft-github-policy-service[bot] commented 1 month ago

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.