fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

Build errors on fresh install

Open gokunymbus opened this issue 9 years ago • 4 comments

Bug Report

  • Package version(s): master
  • Browser and OS versions: Windows

Describe the issue:

When installing a fresh clone of fabric react, running npm install && npm start, i am getting a ton of build errors. The only way to get past this is to remove all the node_modules in packages/office-ui-fabric-react and run npm install in the same directory. Here is a tiny portion of the errors it produces. I have seen this on another fresh install on another windows machine.

Error - typescript - src\demo\pages\ImagePage\examples\Image.Contain.Example.tsx(20,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Contain.Example.tsx(23,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Contain.Example.tsx(23,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Cover.Example.tsx(20,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Cover.Example.tsx(20,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Cover.Example.tsx(23,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Cover.Example.tsx(23,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(13,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(13,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(16,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(16,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(19,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(19,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(22,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.Default.Example.tsx(22,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\ImagePage\examples\Image.MaximizeFrame.Example.tsx(22,11): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.MaximizeFrame.Example.tsx(27,11): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.None.Example.tsx(22,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.None.Example.tsx(25,9): error TS2605: JSX element type 'Image' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\ImagePage\examples\Image.None.Example.tsx(25,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LayerPage\LayerPage.tsx(34,15): error TS2605: JSX element type 'LayerBasicExample' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(4,3): error TS2305: Module '"C:/Projects/fabric-react-fork/packages/office-ui-fabric-react/src/index"' has no exported member 'BaseComponent'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(20,10): error TS2339: Property 'state' does not exist on type 'LayerContentExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(26,10): error TS2339: Property '_async' does not exist on type 'LayerContentExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(26,40): error TS2339: Property 'setState' does not exist on type 'LayerContentExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(33,21): error TS2339: Property 'state' does not exist on type 'LayerContentExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(47,10): error TS2339: Property 'state' does not exist on type 'LayerBasicExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(59,30): error TS2339: Property 'state' does not exist on type 'LayerBasicExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(64,9): error TS2605: JSX element type 'Checkbox' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(64,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(67,44): error TS2339: Property 'setState' does not exist on type 'LayerBasicExample'.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(70,11): error TS2605: JSX element type 'Layer' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(71,13): error TS2605: JSX element type 'LayerContentExample' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Basic.Example.tsx(74,13): error TS2605: JSX element type 'LayerContentExample' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(35,11): error TS2605: JSX element type 'LayerHost' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(35,11): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(42,9): error TS2605: JSX element type 'Checkbox' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(42,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(48,11): error TS2605: JSX element type 'Layer' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LayerPage\examples\Layer.Hosted.Example.tsx(48,11): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LinkPage\examples\Link.Basic.Example.tsx(11,9): error TS2605: JSX element type 'Link' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LinkPage\examples\Link.Basic.Example.tsx(11,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property
Error - typescript - src\demo\pages\LinkPage\examples\Link.Basic.Example.tsx(13,9): error TS2605: JSX element type 'Link' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LinkPage\examples\Link.Basic.Example.tsx(15,9): error TS2605: JSX element type 'Link' is not a constructor function for JSX elements.
Error - typescript - src\demo\pages\LinkPage\examples\Link.Basic.Example.tsx(15,9): error TS2607: JSX element class does not support attributes because it does not have a 'props' property

Actual behavior:

Build not working generating a ton of errors.

Expected behavior:

To build without errors.

gokunymbus avatar Jan 22 '17 22:01 gokunymbus

Try upgrading typescript version, it worked for me. npm install typescript -g. Hope it helps.

mdahamiwal avatar Jan 23 '17 02:01 mdahamiwal

Can you provide the commands you enter from a fresh clone and console output? Particularly when you type npm install?

Output from npm start would probably be also useful.

cliffkoh avatar Jan 24 '17 08:01 cliffkoh

May be related to #881

dzearing avatar Jan 25 '17 16:01 dzearing

Almost certain it is related to #881. I personally don't encounter issues since I don't use the npm scripts ;) Going to close this issue given lack of new information and high chance that it is related to #881.

cliffkoh avatar Jan 26 '17 05:01 cliffkoh