microsoft / FluidFramework

Library for building distributed, real-time collaborative web applications
https://fluidframework.com
MIT License
4.73k stars 532 forks source link

HelloWorld (Dice Roller) sample doesn't build without @types/react #2736

Closed billbliss closed 4 years ago

billbliss commented 4 years ago

Describe the bug

If you follow the instructions for building the HelloWorld (DiceRoller) app, and then type npm run build, you will see errors because of the lack of @types/react in package.json.

To Reproduce

Steps to reproduce the behavior:

  1. Follow the instructions for generating the Hello World sample app.
  2. Type npm run build

You will see these errors:

node_modules/@fluidframework/view-interfaces/dist/reactView.d.ts:4:23 - error TS2688: Cannot find type definition file for 'react'.

4 /// <reference types="react" />
                        ~~~~~

node_modules/@fluidframework/view-interfaces/dist/reactView.d.ts:13:35 - error TS2503: Cannot find namespace 'JSX'.

13     createJSXElement(props?: {}): JSX.Element;
                                     ~~~

Found 2 errors.

It's easily fixed, simply type npm install @types/react --save-dev and then npm run build completes with no errors.

Expected behavior

npm run build to compete with no errors.

Logs

N/A

chensixx commented 4 years ago

I just tried it and I did not see the error messages. By the way did you do npm insall and npm link.? I followed the setup here https://fluid-docs.azurewebsites.net/docs/hello-world.html#setup-to-follow-along, it did not work. We have updated the commands. https://github.com/microsoft/FluidFramework/tree/master/tools/generator-fluid

ChumpChief commented 4 years ago

Closed by #2892