Error: Cannot find module './gitignore'












0















I have created a angular 6 project. When I run ng build or ng serve I get this error :



Cannot find module './gitignore'
Error: Cannot find module './gitignore'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:Centralogicmy-projectnode_modulesglobbyindex.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)


I have tried deleting and adding it from another project.
Also tried clearing cache and running npm install.



What have I missed?










share|improve this question


















  • 2





    why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

    – akhouri
    Jul 19 '18 at 5:29











  • It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

    – NAiVE_developer
    Jul 19 '18 at 5:57











  • are you using any version control system like git ?

    – samar taj Shaikh
    Jul 19 '18 at 6:16











  • This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

    – JanRecker
    Jul 19 '18 at 6:26











  • @samartajShaikh Yes I am.

    – NAiVE_developer
    Jul 19 '18 at 7:34
















0















I have created a angular 6 project. When I run ng build or ng serve I get this error :



Cannot find module './gitignore'
Error: Cannot find module './gitignore'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:Centralogicmy-projectnode_modulesglobbyindex.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)


I have tried deleting and adding it from another project.
Also tried clearing cache and running npm install.



What have I missed?










share|improve this question


















  • 2





    why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

    – akhouri
    Jul 19 '18 at 5:29











  • It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

    – NAiVE_developer
    Jul 19 '18 at 5:57











  • are you using any version control system like git ?

    – samar taj Shaikh
    Jul 19 '18 at 6:16











  • This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

    – JanRecker
    Jul 19 '18 at 6:26











  • @samartajShaikh Yes I am.

    – NAiVE_developer
    Jul 19 '18 at 7:34














0












0








0








I have created a angular 6 project. When I run ng build or ng serve I get this error :



Cannot find module './gitignore'
Error: Cannot find module './gitignore'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:Centralogicmy-projectnode_modulesglobbyindex.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)


I have tried deleting and adding it from another project.
Also tried clearing cache and running npm install.



What have I missed?










share|improve this question














I have created a angular 6 project. When I run ng build or ng serve I get this error :



Cannot find module './gitignore'
Error: Cannot find module './gitignore'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (F:Centralogicmy-projectnode_modulesglobbyindex.js:6:19)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)


I have tried deleting and adding it from another project.
Also tried clearing cache and running npm install.



What have I missed?







angular git gitignore angular6






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jul 19 '18 at 5:07









NAiVE_developerNAiVE_developer

65




65








  • 2





    why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

    – akhouri
    Jul 19 '18 at 5:29











  • It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

    – NAiVE_developer
    Jul 19 '18 at 5:57











  • are you using any version control system like git ?

    – samar taj Shaikh
    Jul 19 '18 at 6:16











  • This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

    – JanRecker
    Jul 19 '18 at 6:26











  • @samartajShaikh Yes I am.

    – NAiVE_developer
    Jul 19 '18 at 7:34














  • 2





    why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

    – akhouri
    Jul 19 '18 at 5:29











  • It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

    – NAiVE_developer
    Jul 19 '18 at 5:57











  • are you using any version control system like git ?

    – samar taj Shaikh
    Jul 19 '18 at 6:16











  • This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

    – JanRecker
    Jul 19 '18 at 6:26











  • @samartajShaikh Yes I am.

    – NAiVE_developer
    Jul 19 '18 at 7:34








2




2





why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

– akhouri
Jul 19 '18 at 5:29





why don't you just create your own .gitignore file? Ideally if you have used angular-cli to build your project, it would have created one.

– akhouri
Jul 19 '18 at 5:29













It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

– NAiVE_developer
Jul 19 '18 at 5:57





It did and I accidentally seemed to delete it while deleting some files. The gitignore file exists in the project. The issue is, of it saying- module not found.

– NAiVE_developer
Jul 19 '18 at 5:57













are you using any version control system like git ?

– samar taj Shaikh
Jul 19 '18 at 6:16





are you using any version control system like git ?

– samar taj Shaikh
Jul 19 '18 at 6:16













This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

– JanRecker
Jul 19 '18 at 6:26





This seems to be no "Angular" problem. It´s not speaking about ngModules, but about Modules. So it´s a problem with a typescript import. Therefore it is very likely, that somewhere you have an "import 'gitignore" in one of your TS files

– JanRecker
Jul 19 '18 at 6:26













@samartajShaikh Yes I am.

– NAiVE_developer
Jul 19 '18 at 7:34





@samartajShaikh Yes I am.

– NAiVE_developer
Jul 19 '18 at 7:34












2 Answers
2






active

oldest

votes


















0














Possibly somewhere in code you importing .gitignore file. Please, try to search your project files for that.






share|improve this answer
























  • I have checked but am unable to find any reference to this file, in the entire project.

    – NAiVE_developer
    Jul 19 '18 at 5:37











  • This is not an answer, please provide a valid answer. with an explanation.

    – Abhishek Ekaanth
    Jul 19 '18 at 5:57











  • Note that the error is about ./gitignore, not .gitignore.

    – Matthieu Moy
    Jul 19 '18 at 12:27



















0














Run the following command, it will update your angular/cli version but find the missing dependency and re-add it.



ng update @angular/cli 





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%2f51414730%2ferror-cannot-find-module-gitignore%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









    0














    Possibly somewhere in code you importing .gitignore file. Please, try to search your project files for that.






    share|improve this answer
























    • I have checked but am unable to find any reference to this file, in the entire project.

      – NAiVE_developer
      Jul 19 '18 at 5:37











    • This is not an answer, please provide a valid answer. with an explanation.

      – Abhishek Ekaanth
      Jul 19 '18 at 5:57











    • Note that the error is about ./gitignore, not .gitignore.

      – Matthieu Moy
      Jul 19 '18 at 12:27
















    0














    Possibly somewhere in code you importing .gitignore file. Please, try to search your project files for that.






    share|improve this answer
























    • I have checked but am unable to find any reference to this file, in the entire project.

      – NAiVE_developer
      Jul 19 '18 at 5:37











    • This is not an answer, please provide a valid answer. with an explanation.

      – Abhishek Ekaanth
      Jul 19 '18 at 5:57











    • Note that the error is about ./gitignore, not .gitignore.

      – Matthieu Moy
      Jul 19 '18 at 12:27














    0












    0








    0







    Possibly somewhere in code you importing .gitignore file. Please, try to search your project files for that.






    share|improve this answer













    Possibly somewhere in code you importing .gitignore file. Please, try to search your project files for that.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 19 '18 at 5:14









    Azamat ZorkanovAzamat Zorkanov

    563137




    563137













    • I have checked but am unable to find any reference to this file, in the entire project.

      – NAiVE_developer
      Jul 19 '18 at 5:37











    • This is not an answer, please provide a valid answer. with an explanation.

      – Abhishek Ekaanth
      Jul 19 '18 at 5:57











    • Note that the error is about ./gitignore, not .gitignore.

      – Matthieu Moy
      Jul 19 '18 at 12:27



















    • I have checked but am unable to find any reference to this file, in the entire project.

      – NAiVE_developer
      Jul 19 '18 at 5:37











    • This is not an answer, please provide a valid answer. with an explanation.

      – Abhishek Ekaanth
      Jul 19 '18 at 5:57











    • Note that the error is about ./gitignore, not .gitignore.

      – Matthieu Moy
      Jul 19 '18 at 12:27

















    I have checked but am unable to find any reference to this file, in the entire project.

    – NAiVE_developer
    Jul 19 '18 at 5:37





    I have checked but am unable to find any reference to this file, in the entire project.

    – NAiVE_developer
    Jul 19 '18 at 5:37













    This is not an answer, please provide a valid answer. with an explanation.

    – Abhishek Ekaanth
    Jul 19 '18 at 5:57





    This is not an answer, please provide a valid answer. with an explanation.

    – Abhishek Ekaanth
    Jul 19 '18 at 5:57













    Note that the error is about ./gitignore, not .gitignore.

    – Matthieu Moy
    Jul 19 '18 at 12:27





    Note that the error is about ./gitignore, not .gitignore.

    – Matthieu Moy
    Jul 19 '18 at 12:27













    0














    Run the following command, it will update your angular/cli version but find the missing dependency and re-add it.



    ng update @angular/cli 





    share|improve this answer




























      0














      Run the following command, it will update your angular/cli version but find the missing dependency and re-add it.



      ng update @angular/cli 





      share|improve this answer


























        0












        0








        0







        Run the following command, it will update your angular/cli version but find the missing dependency and re-add it.



        ng update @angular/cli 





        share|improve this answer













        Run the following command, it will update your angular/cli version but find the missing dependency and re-add it.



        ng update @angular/cli 






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 16:43









        ChadChad

        744620




        744620






























            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%2f51414730%2ferror-cannot-find-module-gitignore%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

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python