Let's say you ran
yo Teams to create a Tab for a Microsoft Teams app. The generated code will use HTML & TypeScript, and uses
Now, add the MSAL package using
npm install msal.
Normally, you would import the MSAL library in your
import * as Msal from 'msal';
Then, referencing the types in that module:
private app: Msal.UserAgentApplication;
Everything looks good in the editor, but running the build (webpack) process results in an error:
TS2307: Cannot find module 'msal'
The Teams generator creates two
The fix: in tsconfig-client.json, change the moduleResolution value to
** NOTE **
Then generator has been updated, so this fix is only necessary in existing projects.