I have created a new Word Web Add-In in Visual Studio 2019. Whenever I try to run it, I get the following errors:
1>------ Build started: Project: WordWebAddIn1Web, Configuration: Debug Any CPU ------
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(188,87): error TS2694: Build:Namespace '"fs"' has no exported member 'Dir'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(191,17): error TS2694: Build:Namespace '"fs"' has no exported member 'OpenDirOptions'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(192,53): error TS2694: Build:Namespace '"fs"' has no exported member 'Dir'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(194,52): error TS2694: Build:Namespace '"fs"' has no exported member 'OpenDirOptions'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(194,80): error TS2694: Build:Namespace '"fs"' has no exported member 'Dir'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(265,52): error TS2694: Build:Namespace 'NodeJS' has no exported member 'ArrayBufferView'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(265,167): error TS2694: Build:Namespace 'NodeJS' has no exported member 'ArrayBufferView'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(266,52): error TS2694: Build:Namespace 'NodeJS' has no exported member 'ArrayBufferView'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(266,149): error TS2694: Build:Namespace 'NodeJS' has no exported member 'ArrayBufferView'.
1>C:\Users\Me\node_modules\@types\fs-extra\index.d.ts(267,52): error TS2694: Build:Namespace 'NodeJS' has no exported member 'ArrayBufferView'.
2>------ Build started: Project: WordWebAddIn1, Configuration: Debug Any CPU ------
2> Successfully created package at: C:\Users\Me\Development\C#\Office Web Addin\WordWebAddIn1\bin\Debug\WordWebAddIn1.debugapp
========== Build: 1 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
I have already deleted the fs-extra folder from node_modules and installed npm install -g @types\fs-extra
.
Ok, I found the answer, I had to delete the @types\fs-extra
folder from my global node_modules.