babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none was installed












1















I am having this issue while installing all node_modules. And this is making me crazy.




babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none was
installed.




Here is my package.json file



{
"name": "react-router-firebase-auth",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react-scripts": "0.9.5"
},
"dependencies": {
"@atlaskit/button": "3.0.0",
"@atlaskit/css-reset": "1.1.4",
"@atlaskit/field-text": "4.0.1",
"@atlaskit/modal-dialog": "2.1.1",
"@atlaskit/page": "4.0.1",
"@atlaskit/util-shared-styles": "2.3.1",
"@shopify/polaris": "^1.5.1",
"babel-eslint": "^7.0.0",
"bootstrap": "^3.3.7",
"eslint": "3.16.1",
"eslint-plugin-react": "6.4.1",
"express": "^4.16.1",
"firebase": "^4.5.0",
"firebase-admin": "^5.4.1",
"firestore": "^1.1.6",
"fixed-data-table": "^0.6.4",
"griddle-react": "^1.8.1",
"jquery": "^3.2.1",
"node-localstorage": "^1.3.0",
"nodemon": "^1.12.1",
"react": "^15.5.3",
"react-bootstrap": "^0.31.3",
"react-bootstrap-button-loader": "^1.0.8",
"react-bootstrap-navbar": "^1.1.0",
"react-data-grid": "^2.0.59",
"react-date-picker": "^6.1.2",
"react-dom": "^15.5.3",
"react-fontawesome": "^1.6.1",
"react-router-dom": "^4.0.0-beta.8",
"react-scripts": "^0.9.5",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"requestify": "^0.2.5",
"simple-react-bootstrap": "^0.2.7",
"styled-components": "1.4.6",
"url": "^0.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}


I am using create-react-app for this project. So i could not change webpack.config.js file. What am i supposed to do here?










share|improve this question


















  • 1





    It seems to be a warning, just ignore it

    – Freez
    Oct 14 '17 at 9:19
















1















I am having this issue while installing all node_modules. And this is making me crazy.




babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none was
installed.




Here is my package.json file



{
"name": "react-router-firebase-auth",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react-scripts": "0.9.5"
},
"dependencies": {
"@atlaskit/button": "3.0.0",
"@atlaskit/css-reset": "1.1.4",
"@atlaskit/field-text": "4.0.1",
"@atlaskit/modal-dialog": "2.1.1",
"@atlaskit/page": "4.0.1",
"@atlaskit/util-shared-styles": "2.3.1",
"@shopify/polaris": "^1.5.1",
"babel-eslint": "^7.0.0",
"bootstrap": "^3.3.7",
"eslint": "3.16.1",
"eslint-plugin-react": "6.4.1",
"express": "^4.16.1",
"firebase": "^4.5.0",
"firebase-admin": "^5.4.1",
"firestore": "^1.1.6",
"fixed-data-table": "^0.6.4",
"griddle-react": "^1.8.1",
"jquery": "^3.2.1",
"node-localstorage": "^1.3.0",
"nodemon": "^1.12.1",
"react": "^15.5.3",
"react-bootstrap": "^0.31.3",
"react-bootstrap-button-loader": "^1.0.8",
"react-bootstrap-navbar": "^1.1.0",
"react-data-grid": "^2.0.59",
"react-date-picker": "^6.1.2",
"react-dom": "^15.5.3",
"react-fontawesome": "^1.6.1",
"react-router-dom": "^4.0.0-beta.8",
"react-scripts": "^0.9.5",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"requestify": "^0.2.5",
"simple-react-bootstrap": "^0.2.7",
"styled-components": "1.4.6",
"url": "^0.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}


I am using create-react-app for this project. So i could not change webpack.config.js file. What am i supposed to do here?










share|improve this question


















  • 1





    It seems to be a warning, just ignore it

    – Freez
    Oct 14 '17 at 9:19














1












1








1








I am having this issue while installing all node_modules. And this is making me crazy.




babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none was
installed.




Here is my package.json file



{
"name": "react-router-firebase-auth",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react-scripts": "0.9.5"
},
"dependencies": {
"@atlaskit/button": "3.0.0",
"@atlaskit/css-reset": "1.1.4",
"@atlaskit/field-text": "4.0.1",
"@atlaskit/modal-dialog": "2.1.1",
"@atlaskit/page": "4.0.1",
"@atlaskit/util-shared-styles": "2.3.1",
"@shopify/polaris": "^1.5.1",
"babel-eslint": "^7.0.0",
"bootstrap": "^3.3.7",
"eslint": "3.16.1",
"eslint-plugin-react": "6.4.1",
"express": "^4.16.1",
"firebase": "^4.5.0",
"firebase-admin": "^5.4.1",
"firestore": "^1.1.6",
"fixed-data-table": "^0.6.4",
"griddle-react": "^1.8.1",
"jquery": "^3.2.1",
"node-localstorage": "^1.3.0",
"nodemon": "^1.12.1",
"react": "^15.5.3",
"react-bootstrap": "^0.31.3",
"react-bootstrap-button-loader": "^1.0.8",
"react-bootstrap-navbar": "^1.1.0",
"react-data-grid": "^2.0.59",
"react-date-picker": "^6.1.2",
"react-dom": "^15.5.3",
"react-fontawesome": "^1.6.1",
"react-router-dom": "^4.0.0-beta.8",
"react-scripts": "^0.9.5",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"requestify": "^0.2.5",
"simple-react-bootstrap": "^0.2.7",
"styled-components": "1.4.6",
"url": "^0.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}


I am using create-react-app for this project. So i could not change webpack.config.js file. What am i supposed to do here?










share|improve this question














I am having this issue while installing all node_modules. And this is making me crazy.




babel-loader@7.1.2 requires a peer of webpack@2 || 3 but none was
installed.




Here is my package.json file



{
"name": "react-router-firebase-auth",
"version": "0.1.0",
"private": true,
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"react-scripts": "0.9.5"
},
"dependencies": {
"@atlaskit/button": "3.0.0",
"@atlaskit/css-reset": "1.1.4",
"@atlaskit/field-text": "4.0.1",
"@atlaskit/modal-dialog": "2.1.1",
"@atlaskit/page": "4.0.1",
"@atlaskit/util-shared-styles": "2.3.1",
"@shopify/polaris": "^1.5.1",
"babel-eslint": "^7.0.0",
"bootstrap": "^3.3.7",
"eslint": "3.16.1",
"eslint-plugin-react": "6.4.1",
"express": "^4.16.1",
"firebase": "^4.5.0",
"firebase-admin": "^5.4.1",
"firestore": "^1.1.6",
"fixed-data-table": "^0.6.4",
"griddle-react": "^1.8.1",
"jquery": "^3.2.1",
"node-localstorage": "^1.3.0",
"nodemon": "^1.12.1",
"react": "^15.5.3",
"react-bootstrap": "^0.31.3",
"react-bootstrap-button-loader": "^1.0.8",
"react-bootstrap-navbar": "^1.1.0",
"react-data-grid": "^2.0.59",
"react-date-picker": "^6.1.2",
"react-dom": "^15.5.3",
"react-fontawesome": "^1.6.1",
"react-router-dom": "^4.0.0-beta.8",
"react-scripts": "^0.9.5",
"react-transition-group": "^1.2.0",
"reactstrap": "^4.8.0",
"requestify": "^0.2.5",
"simple-react-bootstrap": "^0.2.7",
"styled-components": "1.4.6",
"url": "^0.11.0"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
}
}


I am using create-react-app for this project. So i could not change webpack.config.js file. What am i supposed to do here?







javascript reactjs npm babel-loader






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Oct 14 '17 at 9:10









Noman AliNoman Ali

8931133




8931133








  • 1





    It seems to be a warning, just ignore it

    – Freez
    Oct 14 '17 at 9:19














  • 1





    It seems to be a warning, just ignore it

    – Freez
    Oct 14 '17 at 9:19








1




1





It seems to be a warning, just ignore it

– Freez
Oct 14 '17 at 9:19





It seems to be a warning, just ignore it

– Freez
Oct 14 '17 at 9:19












3 Answers
3






active

oldest

votes


















4














Please read this post. It describes what a peer dependency is.



https://stackoverflow.com/a/34645112/2379376



What that means is that you have webpack not installed at all or you have a different version (webpack 1.x) installed. But this plugin needs webpack in version 2 or 3 to function properly.



What you can do is



npm install webpack -g


So npm will install the newest version of webpack on your system.
But now other peer warnings could occur when other loaders need an older version of webpack.






share|improve this answer































    1














    Install webpack globally in node environment as well as in development(as dev dependency).
    As main function of webpack is to bundle JavaScript files for usage in a browser.As each time you made changes to index.js (entry point of npm) at development time then you have to run webpack to make changes in bundle.js file also, so we need to install in both the environment(ie. node environment and development environment)
    Run below command to solve the issue:



    npm install -g webpack@3.10.0
    npm install --save-dev webpack@3.10.0


    Here I am using 3.10.0 for webpack. You can use 4 as well. I think this will help.






    share|improve this answer































      0














      When using Webpack 4:



      I've faced the same error but I actually had the webpack 4 installed. In order to solve this I used the instruction on babel-loader documentation and installed the following extra libraries: babel-loader, @babel/core and @babel/preset-env.



      Command to install all the required libraries:



      npm install -D babel-loader @babel/core @babel/preset-env webpack


      package.json devDependencies before the installation:



        "devDependencies": {
      "chai": "^4.1.2",
      "enzyme": "^3.2.0",
      "enzyme-adapter-react-16": "^1.1.0",
      "expect": "^22.0.3",
      "jest-junit": "^3.3.0",
      "jest-junit-reporter": "^1.1.0",
      "node-sass": "^4.9.2",
      "prop-types": "^15.6.0",
      "react-test-renderer": "^16.2.0",
      "redux-mock-store": "^1.4.0",
      "sass-loader": "^6.0.6",
      "webpack": "^4.25.1",
      "webpack-cli": "^3.1.2",
      "webpack-dev-server": "^3.1.10"
      }


      After the installation:



      "devDependencies": {
      "@babel/core": "^7.1.6",
      "@babel/preset-env": "^7.1.6",
      "babel-loader": "^8.0.4",
      "chai": "^4.1.2",
      "enzyme": "^3.2.0",
      "enzyme-adapter-react-16": "^1.1.0",
      "expect": "^22.0.3",
      "jest-junit": "^3.3.0",
      "jest-junit-reporter": "^1.1.0",
      "node-sass": "^4.9.2",
      "prop-types": "^15.6.0",
      "react-test-renderer": "^16.2.0",
      "redux-mock-store": "^1.4.0",
      "sass-loader": "^6.0.6",
      "webpack": "^4.25.1",
      "webpack-cli": "^3.1.2",
      "webpack-dev-server": "^3.1.10"
      }


      Hope it helps






      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%2f46742824%2fbabel-loader7-1-2-requires-a-peer-of-webpack2-3-but-none-was-installed%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        4














        Please read this post. It describes what a peer dependency is.



        https://stackoverflow.com/a/34645112/2379376



        What that means is that you have webpack not installed at all or you have a different version (webpack 1.x) installed. But this plugin needs webpack in version 2 or 3 to function properly.



        What you can do is



        npm install webpack -g


        So npm will install the newest version of webpack on your system.
        But now other peer warnings could occur when other loaders need an older version of webpack.






        share|improve this answer




























          4














          Please read this post. It describes what a peer dependency is.



          https://stackoverflow.com/a/34645112/2379376



          What that means is that you have webpack not installed at all or you have a different version (webpack 1.x) installed. But this plugin needs webpack in version 2 or 3 to function properly.



          What you can do is



          npm install webpack -g


          So npm will install the newest version of webpack on your system.
          But now other peer warnings could occur when other loaders need an older version of webpack.






          share|improve this answer


























            4












            4








            4







            Please read this post. It describes what a peer dependency is.



            https://stackoverflow.com/a/34645112/2379376



            What that means is that you have webpack not installed at all or you have a different version (webpack 1.x) installed. But this plugin needs webpack in version 2 or 3 to function properly.



            What you can do is



            npm install webpack -g


            So npm will install the newest version of webpack on your system.
            But now other peer warnings could occur when other loaders need an older version of webpack.






            share|improve this answer













            Please read this post. It describes what a peer dependency is.



            https://stackoverflow.com/a/34645112/2379376



            What that means is that you have webpack not installed at all or you have a different version (webpack 1.x) installed. But this plugin needs webpack in version 2 or 3 to function properly.



            What you can do is



            npm install webpack -g


            So npm will install the newest version of webpack on your system.
            But now other peer warnings could occur when other loaders need an older version of webpack.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Oct 14 '17 at 10:41









            DanielDaniel

            1,360715




            1,360715

























                1














                Install webpack globally in node environment as well as in development(as dev dependency).
                As main function of webpack is to bundle JavaScript files for usage in a browser.As each time you made changes to index.js (entry point of npm) at development time then you have to run webpack to make changes in bundle.js file also, so we need to install in both the environment(ie. node environment and development environment)
                Run below command to solve the issue:



                npm install -g webpack@3.10.0
                npm install --save-dev webpack@3.10.0


                Here I am using 3.10.0 for webpack. You can use 4 as well. I think this will help.






                share|improve this answer




























                  1














                  Install webpack globally in node environment as well as in development(as dev dependency).
                  As main function of webpack is to bundle JavaScript files for usage in a browser.As each time you made changes to index.js (entry point of npm) at development time then you have to run webpack to make changes in bundle.js file also, so we need to install in both the environment(ie. node environment and development environment)
                  Run below command to solve the issue:



                  npm install -g webpack@3.10.0
                  npm install --save-dev webpack@3.10.0


                  Here I am using 3.10.0 for webpack. You can use 4 as well. I think this will help.






                  share|improve this answer


























                    1












                    1








                    1







                    Install webpack globally in node environment as well as in development(as dev dependency).
                    As main function of webpack is to bundle JavaScript files for usage in a browser.As each time you made changes to index.js (entry point of npm) at development time then you have to run webpack to make changes in bundle.js file also, so we need to install in both the environment(ie. node environment and development environment)
                    Run below command to solve the issue:



                    npm install -g webpack@3.10.0
                    npm install --save-dev webpack@3.10.0


                    Here I am using 3.10.0 for webpack. You can use 4 as well. I think this will help.






                    share|improve this answer













                    Install webpack globally in node environment as well as in development(as dev dependency).
                    As main function of webpack is to bundle JavaScript files for usage in a browser.As each time you made changes to index.js (entry point of npm) at development time then you have to run webpack to make changes in bundle.js file also, so we need to install in both the environment(ie. node environment and development environment)
                    Run below command to solve the issue:



                    npm install -g webpack@3.10.0
                    npm install --save-dev webpack@3.10.0


                    Here I am using 3.10.0 for webpack. You can use 4 as well. I think this will help.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 29 '18 at 16:00









                    Diwas PoudelDiwas Poudel

                    14219




                    14219























                        0














                        When using Webpack 4:



                        I've faced the same error but I actually had the webpack 4 installed. In order to solve this I used the instruction on babel-loader documentation and installed the following extra libraries: babel-loader, @babel/core and @babel/preset-env.



                        Command to install all the required libraries:



                        npm install -D babel-loader @babel/core @babel/preset-env webpack


                        package.json devDependencies before the installation:



                          "devDependencies": {
                        "chai": "^4.1.2",
                        "enzyme": "^3.2.0",
                        "enzyme-adapter-react-16": "^1.1.0",
                        "expect": "^22.0.3",
                        "jest-junit": "^3.3.0",
                        "jest-junit-reporter": "^1.1.0",
                        "node-sass": "^4.9.2",
                        "prop-types": "^15.6.0",
                        "react-test-renderer": "^16.2.0",
                        "redux-mock-store": "^1.4.0",
                        "sass-loader": "^6.0.6",
                        "webpack": "^4.25.1",
                        "webpack-cli": "^3.1.2",
                        "webpack-dev-server": "^3.1.10"
                        }


                        After the installation:



                        "devDependencies": {
                        "@babel/core": "^7.1.6",
                        "@babel/preset-env": "^7.1.6",
                        "babel-loader": "^8.0.4",
                        "chai": "^4.1.2",
                        "enzyme": "^3.2.0",
                        "enzyme-adapter-react-16": "^1.1.0",
                        "expect": "^22.0.3",
                        "jest-junit": "^3.3.0",
                        "jest-junit-reporter": "^1.1.0",
                        "node-sass": "^4.9.2",
                        "prop-types": "^15.6.0",
                        "react-test-renderer": "^16.2.0",
                        "redux-mock-store": "^1.4.0",
                        "sass-loader": "^6.0.6",
                        "webpack": "^4.25.1",
                        "webpack-cli": "^3.1.2",
                        "webpack-dev-server": "^3.1.10"
                        }


                        Hope it helps






                        share|improve this answer




























                          0














                          When using Webpack 4:



                          I've faced the same error but I actually had the webpack 4 installed. In order to solve this I used the instruction on babel-loader documentation and installed the following extra libraries: babel-loader, @babel/core and @babel/preset-env.



                          Command to install all the required libraries:



                          npm install -D babel-loader @babel/core @babel/preset-env webpack


                          package.json devDependencies before the installation:



                            "devDependencies": {
                          "chai": "^4.1.2",
                          "enzyme": "^3.2.0",
                          "enzyme-adapter-react-16": "^1.1.0",
                          "expect": "^22.0.3",
                          "jest-junit": "^3.3.0",
                          "jest-junit-reporter": "^1.1.0",
                          "node-sass": "^4.9.2",
                          "prop-types": "^15.6.0",
                          "react-test-renderer": "^16.2.0",
                          "redux-mock-store": "^1.4.0",
                          "sass-loader": "^6.0.6",
                          "webpack": "^4.25.1",
                          "webpack-cli": "^3.1.2",
                          "webpack-dev-server": "^3.1.10"
                          }


                          After the installation:



                          "devDependencies": {
                          "@babel/core": "^7.1.6",
                          "@babel/preset-env": "^7.1.6",
                          "babel-loader": "^8.0.4",
                          "chai": "^4.1.2",
                          "enzyme": "^3.2.0",
                          "enzyme-adapter-react-16": "^1.1.0",
                          "expect": "^22.0.3",
                          "jest-junit": "^3.3.0",
                          "jest-junit-reporter": "^1.1.0",
                          "node-sass": "^4.9.2",
                          "prop-types": "^15.6.0",
                          "react-test-renderer": "^16.2.0",
                          "redux-mock-store": "^1.4.0",
                          "sass-loader": "^6.0.6",
                          "webpack": "^4.25.1",
                          "webpack-cli": "^3.1.2",
                          "webpack-dev-server": "^3.1.10"
                          }


                          Hope it helps






                          share|improve this answer


























                            0












                            0








                            0







                            When using Webpack 4:



                            I've faced the same error but I actually had the webpack 4 installed. In order to solve this I used the instruction on babel-loader documentation and installed the following extra libraries: babel-loader, @babel/core and @babel/preset-env.



                            Command to install all the required libraries:



                            npm install -D babel-loader @babel/core @babel/preset-env webpack


                            package.json devDependencies before the installation:



                              "devDependencies": {
                            "chai": "^4.1.2",
                            "enzyme": "^3.2.0",
                            "enzyme-adapter-react-16": "^1.1.0",
                            "expect": "^22.0.3",
                            "jest-junit": "^3.3.0",
                            "jest-junit-reporter": "^1.1.0",
                            "node-sass": "^4.9.2",
                            "prop-types": "^15.6.0",
                            "react-test-renderer": "^16.2.0",
                            "redux-mock-store": "^1.4.0",
                            "sass-loader": "^6.0.6",
                            "webpack": "^4.25.1",
                            "webpack-cli": "^3.1.2",
                            "webpack-dev-server": "^3.1.10"
                            }


                            After the installation:



                            "devDependencies": {
                            "@babel/core": "^7.1.6",
                            "@babel/preset-env": "^7.1.6",
                            "babel-loader": "^8.0.4",
                            "chai": "^4.1.2",
                            "enzyme": "^3.2.0",
                            "enzyme-adapter-react-16": "^1.1.0",
                            "expect": "^22.0.3",
                            "jest-junit": "^3.3.0",
                            "jest-junit-reporter": "^1.1.0",
                            "node-sass": "^4.9.2",
                            "prop-types": "^15.6.0",
                            "react-test-renderer": "^16.2.0",
                            "redux-mock-store": "^1.4.0",
                            "sass-loader": "^6.0.6",
                            "webpack": "^4.25.1",
                            "webpack-cli": "^3.1.2",
                            "webpack-dev-server": "^3.1.10"
                            }


                            Hope it helps






                            share|improve this answer













                            When using Webpack 4:



                            I've faced the same error but I actually had the webpack 4 installed. In order to solve this I used the instruction on babel-loader documentation and installed the following extra libraries: babel-loader, @babel/core and @babel/preset-env.



                            Command to install all the required libraries:



                            npm install -D babel-loader @babel/core @babel/preset-env webpack


                            package.json devDependencies before the installation:



                              "devDependencies": {
                            "chai": "^4.1.2",
                            "enzyme": "^3.2.0",
                            "enzyme-adapter-react-16": "^1.1.0",
                            "expect": "^22.0.3",
                            "jest-junit": "^3.3.0",
                            "jest-junit-reporter": "^1.1.0",
                            "node-sass": "^4.9.2",
                            "prop-types": "^15.6.0",
                            "react-test-renderer": "^16.2.0",
                            "redux-mock-store": "^1.4.0",
                            "sass-loader": "^6.0.6",
                            "webpack": "^4.25.1",
                            "webpack-cli": "^3.1.2",
                            "webpack-dev-server": "^3.1.10"
                            }


                            After the installation:



                            "devDependencies": {
                            "@babel/core": "^7.1.6",
                            "@babel/preset-env": "^7.1.6",
                            "babel-loader": "^8.0.4",
                            "chai": "^4.1.2",
                            "enzyme": "^3.2.0",
                            "enzyme-adapter-react-16": "^1.1.0",
                            "expect": "^22.0.3",
                            "jest-junit": "^3.3.0",
                            "jest-junit-reporter": "^1.1.0",
                            "node-sass": "^4.9.2",
                            "prop-types": "^15.6.0",
                            "react-test-renderer": "^16.2.0",
                            "redux-mock-store": "^1.4.0",
                            "sass-loader": "^6.0.6",
                            "webpack": "^4.25.1",
                            "webpack-cli": "^3.1.2",
                            "webpack-dev-server": "^3.1.10"
                            }


                            Hope it helps







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Nov 18 '18 at 1:43









                            Daniel SantanaDaniel Santana

                            103310




                            103310






























                                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%2f46742824%2fbabel-loader7-1-2-requires-a-peer-of-webpack2-3-but-none-was-installed%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

                                Monofisismo

                                Angular Downloading a file using contenturl with Basic Authentication

                                Olmecas