install material-ui in visual studio react project












0















I'm new to using npm and react inside Visual Studio. Tried to install Material-UI@next for my React project but got these warnings when running the project.



enter image description here



[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:12:11 
TS2694: Namespace 'React' has no exported member 'ButtonHTMLAttributes'.
[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:13:9
TS2694: Namespace 'React' has no exported member 'AnchorHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Chip/Chip.d.ts:4:18
TS2430: Interface 'ChipProps' incorrectly extends interface 'HTMLAttributes<HTMLDivElement>'.
Types of property 'label' are incompatible.
Type 'ReactNode' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.
[at-loader] ./node_modules/material-ui/Form/FormControl.d.ts:5:17
TS2694: Namespace 'React' has no exported member 'HtmlHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Form/FormControlLabel.d.ts:13:11
TS2694: Namespace 'React' has no exported member 'LabelHTMLAttributes'.
...


enter image description here



Something obvious I am missing?










share|improve this question

























  • Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

    – War10ck
    Oct 17 '17 at 19:51











  • No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

    – Rob
    Oct 17 '17 at 20:07











  • what version of visual studio?

    – Sagiv b.g
    Oct 17 '17 at 20:23











  • Visual Studio Community 2017, Version 15.3.5

    – Rob
    Oct 17 '17 at 20:34
















0















I'm new to using npm and react inside Visual Studio. Tried to install Material-UI@next for my React project but got these warnings when running the project.



enter image description here



[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:12:11 
TS2694: Namespace 'React' has no exported member 'ButtonHTMLAttributes'.
[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:13:9
TS2694: Namespace 'React' has no exported member 'AnchorHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Chip/Chip.d.ts:4:18
TS2430: Interface 'ChipProps' incorrectly extends interface 'HTMLAttributes<HTMLDivElement>'.
Types of property 'label' are incompatible.
Type 'ReactNode' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.
[at-loader] ./node_modules/material-ui/Form/FormControl.d.ts:5:17
TS2694: Namespace 'React' has no exported member 'HtmlHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Form/FormControlLabel.d.ts:13:11
TS2694: Namespace 'React' has no exported member 'LabelHTMLAttributes'.
...


enter image description here



Something obvious I am missing?










share|improve this question

























  • Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

    – War10ck
    Oct 17 '17 at 19:51











  • No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

    – Rob
    Oct 17 '17 at 20:07











  • what version of visual studio?

    – Sagiv b.g
    Oct 17 '17 at 20:23











  • Visual Studio Community 2017, Version 15.3.5

    – Rob
    Oct 17 '17 at 20:34














0












0








0








I'm new to using npm and react inside Visual Studio. Tried to install Material-UI@next for my React project but got these warnings when running the project.



enter image description here



[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:12:11 
TS2694: Namespace 'React' has no exported member 'ButtonHTMLAttributes'.
[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:13:9
TS2694: Namespace 'React' has no exported member 'AnchorHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Chip/Chip.d.ts:4:18
TS2430: Interface 'ChipProps' incorrectly extends interface 'HTMLAttributes<HTMLDivElement>'.
Types of property 'label' are incompatible.
Type 'ReactNode' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.
[at-loader] ./node_modules/material-ui/Form/FormControl.d.ts:5:17
TS2694: Namespace 'React' has no exported member 'HtmlHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Form/FormControlLabel.d.ts:13:11
TS2694: Namespace 'React' has no exported member 'LabelHTMLAttributes'.
...


enter image description here



Something obvious I am missing?










share|improve this question
















I'm new to using npm and react inside Visual Studio. Tried to install Material-UI@next for my React project but got these warnings when running the project.



enter image description here



[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:12:11 
TS2694: Namespace 'React' has no exported member 'ButtonHTMLAttributes'.
[at-loader] ./node_modules/material-ui/ButtonBase/ButtonBase.d.ts:13:9
TS2694: Namespace 'React' has no exported member 'AnchorHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Chip/Chip.d.ts:4:18
TS2430: Interface 'ChipProps' incorrectly extends interface 'HTMLAttributes<HTMLDivElement>'.
Types of property 'label' are incompatible.
Type 'ReactNode' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.
[at-loader] ./node_modules/material-ui/Form/FormControl.d.ts:5:17
TS2694: Namespace 'React' has no exported member 'HtmlHTMLAttributes'.
[at-loader] ./node_modules/material-ui/Form/FormControlLabel.d.ts:13:11
TS2694: Namespace 'React' has no exported member 'LabelHTMLAttributes'.
...


enter image description here



Something obvious I am missing?







visual-studio reactjs material-ui






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 17 '17 at 20:05







Rob

















asked Oct 17 '17 at 19:47









RobRob

278




278













  • Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

    – War10ck
    Oct 17 '17 at 19:51











  • No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

    – Rob
    Oct 17 '17 at 20:07











  • what version of visual studio?

    – Sagiv b.g
    Oct 17 '17 at 20:23











  • Visual Studio Community 2017, Version 15.3.5

    – Rob
    Oct 17 '17 at 20:34



















  • Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

    – War10ck
    Oct 17 '17 at 19:51











  • No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

    – Rob
    Oct 17 '17 at 20:07











  • what version of visual studio?

    – Sagiv b.g
    Oct 17 '17 at 20:23











  • Visual Studio Community 2017, Version 15.3.5

    – Rob
    Oct 17 '17 at 20:34

















Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

– War10ck
Oct 17 '17 at 19:51





Are you using an AMD module loader (i.e. CommonJS or RequireJS)?...

– War10ck
Oct 17 '17 at 19:51













No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

– Rob
Oct 17 '17 at 20:07





No, I don't think so. I am using webpack to pack the js-files. The project is based on the Visual Studio template "React.js and Redux", and the only change I've made so far is adding Material-UI.

– Rob
Oct 17 '17 at 20:07













what version of visual studio?

– Sagiv b.g
Oct 17 '17 at 20:23





what version of visual studio?

– Sagiv b.g
Oct 17 '17 at 20:23













Visual Studio Community 2017, Version 15.3.5

– Rob
Oct 17 '17 at 20:34





Visual Studio Community 2017, Version 15.3.5

– Rob
Oct 17 '17 at 20:34












1 Answer
1






active

oldest

votes


















2














I had the exact same issue getting the latest Material-UI working with .Net core's 'react/redux' template. I found it to be a matter of getting the correct versions of the dependencies in order.



In order to get it working, I updated all of the packages to the latest versions:



$ npm install -g npm-check-updates
$ npm-check-updates -u
$ npm install



Once I updated those refs, some of the sample code broke. So I simply removed the broken bits as all I cared about was getting Material-UI working.



Once I had that part, I just had to do the proper imports and was able to use the Paper element.



Here is an example of how I got it working.



https://github.com/cbehrends/MaterialUI_DotNetCore.git



Good Luck!



Edit:
I've updated the repo and fixed any version issues I found. I'm going to try and keep this repo updated as best I can. Cheers!






share|improve this answer

























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46798061%2finstall-material-ui-in-visual-studio-react-project%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    I had the exact same issue getting the latest Material-UI working with .Net core's 'react/redux' template. I found it to be a matter of getting the correct versions of the dependencies in order.



    In order to get it working, I updated all of the packages to the latest versions:



    $ npm install -g npm-check-updates
    $ npm-check-updates -u
    $ npm install



    Once I updated those refs, some of the sample code broke. So I simply removed the broken bits as all I cared about was getting Material-UI working.



    Once I had that part, I just had to do the proper imports and was able to use the Paper element.



    Here is an example of how I got it working.



    https://github.com/cbehrends/MaterialUI_DotNetCore.git



    Good Luck!



    Edit:
    I've updated the repo and fixed any version issues I found. I'm going to try and keep this repo updated as best I can. Cheers!






    share|improve this answer






























      2














      I had the exact same issue getting the latest Material-UI working with .Net core's 'react/redux' template. I found it to be a matter of getting the correct versions of the dependencies in order.



      In order to get it working, I updated all of the packages to the latest versions:



      $ npm install -g npm-check-updates
      $ npm-check-updates -u
      $ npm install



      Once I updated those refs, some of the sample code broke. So I simply removed the broken bits as all I cared about was getting Material-UI working.



      Once I had that part, I just had to do the proper imports and was able to use the Paper element.



      Here is an example of how I got it working.



      https://github.com/cbehrends/MaterialUI_DotNetCore.git



      Good Luck!



      Edit:
      I've updated the repo and fixed any version issues I found. I'm going to try and keep this repo updated as best I can. Cheers!






      share|improve this answer




























        2












        2








        2







        I had the exact same issue getting the latest Material-UI working with .Net core's 'react/redux' template. I found it to be a matter of getting the correct versions of the dependencies in order.



        In order to get it working, I updated all of the packages to the latest versions:



        $ npm install -g npm-check-updates
        $ npm-check-updates -u
        $ npm install



        Once I updated those refs, some of the sample code broke. So I simply removed the broken bits as all I cared about was getting Material-UI working.



        Once I had that part, I just had to do the proper imports and was able to use the Paper element.



        Here is an example of how I got it working.



        https://github.com/cbehrends/MaterialUI_DotNetCore.git



        Good Luck!



        Edit:
        I've updated the repo and fixed any version issues I found. I'm going to try and keep this repo updated as best I can. Cheers!






        share|improve this answer















        I had the exact same issue getting the latest Material-UI working with .Net core's 'react/redux' template. I found it to be a matter of getting the correct versions of the dependencies in order.



        In order to get it working, I updated all of the packages to the latest versions:



        $ npm install -g npm-check-updates
        $ npm-check-updates -u
        $ npm install



        Once I updated those refs, some of the sample code broke. So I simply removed the broken bits as all I cared about was getting Material-UI working.



        Once I had that part, I just had to do the proper imports and was able to use the Paper element.



        Here is an example of how I got it working.



        https://github.com/cbehrends/MaterialUI_DotNetCore.git



        Good Luck!



        Edit:
        I've updated the repo and fixed any version issues I found. I'm going to try and keep this repo updated as best I can. Cheers!







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Feb 15 '18 at 12:57

























        answered Oct 19 '17 at 13:04









        CoreyCorey

        3114




        3114
































            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46798061%2finstall-material-ui-in-visual-studio-react-project%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Mossoró

            Cannot access a disposed object : DataContext

            Can't read property showImagePicker of undefined in react native iOS