Angular 7 ng build, registry.registerUriHandler is not a function in bitbucket pipelines









up vote
0
down vote

favorite












I just updated my app to Angular 7, it compiles fine in local but when i try to deploy to bitbucket i get this error with ng build




registry.registerUriHandler is not a function TypeError:
registry.registerUriHandler is not a function
at Object.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/models/command-runner.js:47:14)
at default_1 (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/lib/cli/index.js:32:54)
at Object. (/usr/local/lib/node_modules/@angular/cli/lib/init.js:125:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)




I don't understand what has pipelines to do with this but i think it could be an error with angular, any idea of how to solve this?










share|improve this question























  • Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
    – mwilson
    Oct 24 at 22:41










  • I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
    – Ruben Gonzalez
    Oct 24 at 22:43










  • What is in your test configuration?
    – mwilson
    Oct 24 at 22:59










  • Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
    – Ruben Gonzalez
    Oct 25 at 0:52










  • Do you have a repo you can share?
    – mwilson
    Oct 25 at 3:01














up vote
0
down vote

favorite












I just updated my app to Angular 7, it compiles fine in local but when i try to deploy to bitbucket i get this error with ng build




registry.registerUriHandler is not a function TypeError:
registry.registerUriHandler is not a function
at Object.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/models/command-runner.js:47:14)
at default_1 (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/lib/cli/index.js:32:54)
at Object. (/usr/local/lib/node_modules/@angular/cli/lib/init.js:125:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)




I don't understand what has pipelines to do with this but i think it could be an error with angular, any idea of how to solve this?










share|improve this question























  • Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
    – mwilson
    Oct 24 at 22:41










  • I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
    – Ruben Gonzalez
    Oct 24 at 22:43










  • What is in your test configuration?
    – mwilson
    Oct 24 at 22:59










  • Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
    – Ruben Gonzalez
    Oct 25 at 0:52










  • Do you have a repo you can share?
    – mwilson
    Oct 25 at 3:01












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I just updated my app to Angular 7, it compiles fine in local but when i try to deploy to bitbucket i get this error with ng build




registry.registerUriHandler is not a function TypeError:
registry.registerUriHandler is not a function
at Object.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/models/command-runner.js:47:14)
at default_1 (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/lib/cli/index.js:32:54)
at Object. (/usr/local/lib/node_modules/@angular/cli/lib/init.js:125:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)




I don't understand what has pipelines to do with this but i think it could be an error with angular, any idea of how to solve this?










share|improve this question















I just updated my app to Angular 7, it compiles fine in local but when i try to deploy to bitbucket i get this error with ng build




registry.registerUriHandler is not a function TypeError:
registry.registerUriHandler is not a function
at Object.runCommand (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/models/command-runner.js:47:14)
at default_1 (/opt/atlassian/pipelines/agent/build/node_modules/@angular/cli/lib/cli/index.js:32:54)
at Object. (/usr/local/lib/node_modules/@angular/cli/lib/init.js:125:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)




I don't understand what has pipelines to do with this but i think it could be an error with angular, any idea of how to solve this?







javascript angular pipeline bitbucket-pipelines angular7






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 11 at 15:26









Goncalo Peres

1,0911313




1,0911313










asked Oct 24 at 22:39









Ruben Gonzalez

60111




60111











  • Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
    – mwilson
    Oct 24 at 22:41










  • I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
    – Ruben Gonzalez
    Oct 24 at 22:43










  • What is in your test configuration?
    – mwilson
    Oct 24 at 22:59










  • Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
    – Ruben Gonzalez
    Oct 25 at 0:52










  • Do you have a repo you can share?
    – mwilson
    Oct 25 at 3:01
















  • Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
    – mwilson
    Oct 24 at 22:41










  • I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
    – Ruben Gonzalez
    Oct 24 at 22:43










  • What is in your test configuration?
    – mwilson
    Oct 24 at 22:59










  • Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
    – Ruben Gonzalez
    Oct 25 at 0:52










  • Do you have a repo you can share?
    – mwilson
    Oct 25 at 3:01















Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
– mwilson
Oct 24 at 22:41




Are you sure you're only running ng build for your deploy? You (should) be running something like ng build --prod --aot If you try to run a prod build with aot, can you reproduce it locally?
– mwilson
Oct 24 at 22:41












I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
– Ruben Gonzalez
Oct 24 at 22:43




I'm using ng build --configuration=test to build with a custom enviroment, but i have been using that for a while and i can make the build locally with no problems
– Ruben Gonzalez
Oct 24 at 22:43












What is in your test configuration?
– mwilson
Oct 24 at 22:59




What is in your test configuration?
– mwilson
Oct 24 at 22:59












Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
– Ruben Gonzalez
Oct 25 at 0:52




Only this... "test": "fileReplacements": [ "replace": "src/environments/environment.ts", "with": "src/environments/environment.test.ts" ]
– Ruben Gonzalez
Oct 25 at 0:52












Do you have a repo you can share?
– mwilson
Oct 25 at 3:01




Do you have a repo you can share?
– mwilson
Oct 25 at 3:01












1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Well i found the problem after lots of headaches, pipelines was trying to build the angular 7 app with the angular 6 cli, even thought i was explicitly installing @angular/cli 7.0.2. I discovered that pipelines makes a cache of node_modules so it was using the old cli, cleaning the cache made the error go away.






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',
    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%2f52978877%2fangular-7-ng-build-registry-registerurihandler-is-not-a-function-in-bitbucket-p%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








    up vote
    0
    down vote



    accepted










    Well i found the problem after lots of headaches, pipelines was trying to build the angular 7 app with the angular 6 cli, even thought i was explicitly installing @angular/cli 7.0.2. I discovered that pipelines makes a cache of node_modules so it was using the old cli, cleaning the cache made the error go away.






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      Well i found the problem after lots of headaches, pipelines was trying to build the angular 7 app with the angular 6 cli, even thought i was explicitly installing @angular/cli 7.0.2. I discovered that pipelines makes a cache of node_modules so it was using the old cli, cleaning the cache made the error go away.






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Well i found the problem after lots of headaches, pipelines was trying to build the angular 7 app with the angular 6 cli, even thought i was explicitly installing @angular/cli 7.0.2. I discovered that pipelines makes a cache of node_modules so it was using the old cli, cleaning the cache made the error go away.






        share|improve this answer












        Well i found the problem after lots of headaches, pipelines was trying to build the angular 7 app with the angular 6 cli, even thought i was explicitly installing @angular/cli 7.0.2. I discovered that pipelines makes a cache of node_modules so it was using the old cli, cleaning the cache made the error go away.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 25 at 4:14









        Ruben Gonzalez

        60111




        60111



























            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.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • 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%2f52978877%2fangular-7-ng-build-registry-registerurihandler-is-not-a-function-in-bitbucket-p%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







            這個網誌中的熱門文章

            Barbados

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3