Module not found: Error: Can't resolve 'react-select' with typescript










0















module import is not working for me. I'm tried different solutions provided from stack overflow and other.
These are steps I'm follow the react-select



npm install --save @types/react-select


import the module like this



import Select from "react-select"


but I got the error




Module not found: Error: Can't resolve 'react-select'




import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>

render()
return(
<Select id="color" options=options />
);




But I can't find the way to fixed this.










share|improve this question



















  • 1





    Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:22







  • 1





    Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:26







  • 1





    You didn't answer about bundling though

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:32






  • 1





    Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:39







  • 1





    Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:47















0















module import is not working for me. I'm tried different solutions provided from stack overflow and other.
These are steps I'm follow the react-select



npm install --save @types/react-select


import the module like this



import Select from "react-select"


but I got the error




Module not found: Error: Can't resolve 'react-select'




import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>

render()
return(
<Select id="color" options=options />
);




But I can't find the way to fixed this.










share|improve this question



















  • 1





    Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:22







  • 1





    Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:26







  • 1





    You didn't answer about bundling though

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:32






  • 1





    Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:39







  • 1





    Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:47













0












0








0








module import is not working for me. I'm tried different solutions provided from stack overflow and other.
These are steps I'm follow the react-select



npm install --save @types/react-select


import the module like this



import Select from "react-select"


but I got the error




Module not found: Error: Can't resolve 'react-select'




import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>

render()
return(
<Select id="color" options=options />
);




But I can't find the way to fixed this.










share|improve this question
















module import is not working for me. I'm tried different solutions provided from stack overflow and other.
These are steps I'm follow the react-select



npm install --save @types/react-select


import the module like this



import Select from "react-select"


but I got the error




Module not found: Error: Can't resolve 'react-select'




import * as React from "react";
import ReactSelect from 'react-select'
export class Select extends extends React.Component<someProps>

render()
return(
<Select id="color" options=options />
);




But I can't find the way to fixed this.







reactjs typescript react-select






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 11:18







Namindu Sanchila

















asked Nov 13 '18 at 11:08









Namindu SanchilaNamindu Sanchila

61110




61110







  • 1





    Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:22







  • 1





    Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:26







  • 1





    You didn't answer about bundling though

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:32






  • 1





    Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:39







  • 1





    Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:47












  • 1





    Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:22







  • 1





    Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:26







  • 1





    You didn't answer about bundling though

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:32






  • 1





    Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:39







  • 1





    Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

    – Nurbol Alpysbayev
    Nov 13 '18 at 11:47







1




1





Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

– Nurbol Alpysbayev
Nov 13 '18 at 11:22






Where does this error occur: Module not found: Error: Can't resolve 'react-select'? Is it shown by TS in editor or by JS in runtime?

– Nurbol Alpysbayev
Nov 13 '18 at 11:22





1




1





Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

– Nurbol Alpysbayev
Nov 13 '18 at 11:26






Did you run the bundling process after installing the package? Does npm list --depth=0 shows react-select?

– Nurbol Alpysbayev
Nov 13 '18 at 11:26





1




1





You didn't answer about bundling though

– Nurbol Alpysbayev
Nov 13 '18 at 11:32





You didn't answer about bundling though

– Nurbol Alpysbayev
Nov 13 '18 at 11:32




1




1





Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

– Nurbol Alpysbayev
Nov 13 '18 at 11:39






Every time you make some edits to your code, as well as when installing a package, you have to rebuild (re-bundle) your project. So if you use Webpack (npm run build), you should run it. If you use create-react-app, you should run npm start

– Nurbol Alpysbayev
Nov 13 '18 at 11:39





1




1





Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

– Nurbol Alpysbayev
Nov 13 '18 at 11:47





Sorry I ran out of ideas. My guesses is something is wrong with your build process, or maybe... there's a hidden character in the module name (I would retype it by hand) :D

– Nurbol Alpysbayev
Nov 13 '18 at 11:47












2 Answers
2






active

oldest

votes


















1














You have an error:



npm install --save @type/react-select


instead of



npm install --save @types/react-select


Also I would recommend to use --save-dev instead of --save because you don't need typings in production.






share|improve this answer























  • yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

    – Namindu Sanchila
    Nov 13 '18 at 11:18











  • yar I had use environment too. but this snippets for the example how im used it

    – Namindu Sanchila
    Nov 13 '18 at 11:19











  • It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

    – Namindu Sanchila
    Nov 13 '18 at 11:23


















0














I found the issue having here. Issue is both @types/react-select and react-select added to the package.json






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%2f53279686%2fmodule-not-found-error-cant-resolve-react-select-with-typescript%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    You have an error:



    npm install --save @type/react-select


    instead of



    npm install --save @types/react-select


    Also I would recommend to use --save-dev instead of --save because you don't need typings in production.






    share|improve this answer























    • yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

      – Namindu Sanchila
      Nov 13 '18 at 11:18











    • yar I had use environment too. but this snippets for the example how im used it

      – Namindu Sanchila
      Nov 13 '18 at 11:19











    • It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

      – Namindu Sanchila
      Nov 13 '18 at 11:23















    1














    You have an error:



    npm install --save @type/react-select


    instead of



    npm install --save @types/react-select


    Also I would recommend to use --save-dev instead of --save because you don't need typings in production.






    share|improve this answer























    • yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

      – Namindu Sanchila
      Nov 13 '18 at 11:18











    • yar I had use environment too. but this snippets for the example how im used it

      – Namindu Sanchila
      Nov 13 '18 at 11:19











    • It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

      – Namindu Sanchila
      Nov 13 '18 at 11:23













    1












    1








    1







    You have an error:



    npm install --save @type/react-select


    instead of



    npm install --save @types/react-select


    Also I would recommend to use --save-dev instead of --save because you don't need typings in production.






    share|improve this answer













    You have an error:



    npm install --save @type/react-select


    instead of



    npm install --save @types/react-select


    Also I would recommend to use --save-dev instead of --save because you don't need typings in production.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 13 '18 at 11:15









    Nurbol AlpysbayevNurbol Alpysbayev

    4,2811330




    4,2811330












    • yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

      – Namindu Sanchila
      Nov 13 '18 at 11:18











    • yar I had use environment too. but this snippets for the example how im used it

      – Namindu Sanchila
      Nov 13 '18 at 11:19











    • It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

      – Namindu Sanchila
      Nov 13 '18 at 11:23

















    • yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

      – Namindu Sanchila
      Nov 13 '18 at 11:18











    • yar I had use environment too. but this snippets for the example how im used it

      – Namindu Sanchila
      Nov 13 '18 at 11:19











    • It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

      – Namindu Sanchila
      Nov 13 '18 at 11:23
















    yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

    – Namindu Sanchila
    Nov 13 '18 at 11:18





    yar sorry for that I'm used the npm install --save @types/react-select it's same as you provided. In the questions it should be edited.

    – Namindu Sanchila
    Nov 13 '18 at 11:18













    yar I had use environment too. but this snippets for the example how im used it

    – Namindu Sanchila
    Nov 13 '18 at 11:19





    yar I had use environment too. but this snippets for the example how im used it

    – Namindu Sanchila
    Nov 13 '18 at 11:19













    It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

    – Namindu Sanchila
    Nov 13 '18 at 11:23





    It's also correct in the code. only error I got is Module not found: Error: Can't resolve 'react-select'

    – Namindu Sanchila
    Nov 13 '18 at 11:23













    0














    I found the issue having here. Issue is both @types/react-select and react-select added to the package.json






    share|improve this answer



























      0














      I found the issue having here. Issue is both @types/react-select and react-select added to the package.json






      share|improve this answer

























        0












        0








        0







        I found the issue having here. Issue is both @types/react-select and react-select added to the package.json






        share|improve this answer













        I found the issue having here. Issue is both @types/react-select and react-select added to the package.json







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 15 '18 at 8:21









        Namindu SanchilaNamindu Sanchila

        61110




        61110



























            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%2f53279686%2fmodule-not-found-error-cant-resolve-react-select-with-typescript%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

            Darth Vader #20

            How to how show current date and time by default on contact form 7 in WordPress without taking input from user in datetimepicker

            Ondo