OfficeDev / msteams-meetings-template

Template for an app that creates Microsoft Teams meetings
MIT License
61 stars 49 forks source link

yarn build fails after fresh yarn install #21

Closed kenneth-hendricks closed 4 years ago

kenneth-hendricks commented 4 years ago

Ran into the following error when trying to build from scratch:

yarn run v1.22.5
$ react-scripts build
Creating an optimized production build...
Failed to compile.

/siteroot/src/RootReducer.ts
TypeScript error in /siteroot/src/RootReducer.ts(9,27):
Namespace '"/siteroot/node_modules/@types/history/index".History' has no exported member 'PoorMansUnknown'.  TS2694

     7 | export interface AppState {
     8 |   meeting: MeetingState;
  >  9 |   router: History<History.PoorMansUnknown>;
       |                           ^
    10 | }
    11 | 
    12 | export function createRootReducer(history: History) {

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I think it's related to this commit https://github.com/DefinitelyTyped/DefinitelyTyped/commit/cc251bdaf2ec2626bacb1c097334b8a36f43c0d4#diff-dcca2fdd8c0717a0e2e771661ec424a8a81899b5d35ec0d33afd7c588ccd1778 where they removed PoorMansUnknown.

As a work around I installed @types/history@4.7.7 , but the interface should probably be updated to work with the new version.

aosolis commented 4 years ago

Thanks for reporting this @kenneth-hendricks! I pushed out the fix to the repo.