Elastic Beanstalk + Laravel: Can't run Gulp because of old NodeJS Version 0.10












0















I try to deploy a Laravel repo on AWS Elastic Beanstalk. For this I've created a PHP environment on a t2.medium instance and initialized a deployment with AWS CodePipeline.



I need to run npm and gulp on production for creating my static assets, but unfortunately I'm not able to run NPM because of an old NodeJS version installed. It's 0.10.46-1nodesource.el7.centos.



At the moment I'm using two config scripts to install NodeJS 10.X, run the migrations and gulp:



First:



commands:
01getNodeRepo:
command: "curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -"
02installNode:
command: "yum install -y nodejs"
03updateNpm:
command: "npm install npm -g"
04enableSudo:
command: "echo Defaults:root \!requiretty >> /etc/sudoers"


Second:



container_commands:
01artisanMigrate:
command: "php artisan migrate --force"
02showNodeVersion:
command: "node -v"
03showNpmVersion:
command: "npm -v"
04npmInstall:
command: "sudo npm install"
05gulp:
command: "sudo ./node_modules/.bin/gulp --production"


Here is an extract from my log files which shows that AWS EB found two nodesource repos and will be using the old version:



[2019-01-01T19:32:23.008Z] INFO  [1535]  - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Starting activity...
[2019-01-01T19:32:25.314Z] INFO [1535] - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Completed activity. Result:
Loaded plugins: priorities, update-motd, upgrade-helper
Repository nodesource is listed more than once in the configuration
Repository nodesource-source is listed more than once in the configuration
Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:0.10.46-1nodesource.el7.centos will be installed
--> Finished Dependency Resolution


Any ideas how I can force the environment to use the new version? Thanks!










share|improve this question



























    0















    I try to deploy a Laravel repo on AWS Elastic Beanstalk. For this I've created a PHP environment on a t2.medium instance and initialized a deployment with AWS CodePipeline.



    I need to run npm and gulp on production for creating my static assets, but unfortunately I'm not able to run NPM because of an old NodeJS version installed. It's 0.10.46-1nodesource.el7.centos.



    At the moment I'm using two config scripts to install NodeJS 10.X, run the migrations and gulp:



    First:



    commands:
    01getNodeRepo:
    command: "curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -"
    02installNode:
    command: "yum install -y nodejs"
    03updateNpm:
    command: "npm install npm -g"
    04enableSudo:
    command: "echo Defaults:root \!requiretty >> /etc/sudoers"


    Second:



    container_commands:
    01artisanMigrate:
    command: "php artisan migrate --force"
    02showNodeVersion:
    command: "node -v"
    03showNpmVersion:
    command: "npm -v"
    04npmInstall:
    command: "sudo npm install"
    05gulp:
    command: "sudo ./node_modules/.bin/gulp --production"


    Here is an extract from my log files which shows that AWS EB found two nodesource repos and will be using the old version:



    [2019-01-01T19:32:23.008Z] INFO  [1535]  - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Starting activity...
    [2019-01-01T19:32:25.314Z] INFO [1535] - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Completed activity. Result:
    Loaded plugins: priorities, update-motd, upgrade-helper
    Repository nodesource is listed more than once in the configuration
    Repository nodesource-source is listed more than once in the configuration
    Resolving Dependencies
    --> Running transaction check
    ---> Package nodejs.x86_64 0:0.10.46-1nodesource.el7.centos will be installed
    --> Finished Dependency Resolution


    Any ideas how I can force the environment to use the new version? Thanks!










    share|improve this question

























      0












      0








      0








      I try to deploy a Laravel repo on AWS Elastic Beanstalk. For this I've created a PHP environment on a t2.medium instance and initialized a deployment with AWS CodePipeline.



      I need to run npm and gulp on production for creating my static assets, but unfortunately I'm not able to run NPM because of an old NodeJS version installed. It's 0.10.46-1nodesource.el7.centos.



      At the moment I'm using two config scripts to install NodeJS 10.X, run the migrations and gulp:



      First:



      commands:
      01getNodeRepo:
      command: "curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -"
      02installNode:
      command: "yum install -y nodejs"
      03updateNpm:
      command: "npm install npm -g"
      04enableSudo:
      command: "echo Defaults:root \!requiretty >> /etc/sudoers"


      Second:



      container_commands:
      01artisanMigrate:
      command: "php artisan migrate --force"
      02showNodeVersion:
      command: "node -v"
      03showNpmVersion:
      command: "npm -v"
      04npmInstall:
      command: "sudo npm install"
      05gulp:
      command: "sudo ./node_modules/.bin/gulp --production"


      Here is an extract from my log files which shows that AWS EB found two nodesource repos and will be using the old version:



      [2019-01-01T19:32:23.008Z] INFO  [1535]  - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Starting activity...
      [2019-01-01T19:32:25.314Z] INFO [1535] - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Completed activity. Result:
      Loaded plugins: priorities, update-motd, upgrade-helper
      Repository nodesource is listed more than once in the configuration
      Repository nodesource-source is listed more than once in the configuration
      Resolving Dependencies
      --> Running transaction check
      ---> Package nodejs.x86_64 0:0.10.46-1nodesource.el7.centos will be installed
      --> Finished Dependency Resolution


      Any ideas how I can force the environment to use the new version? Thanks!










      share|improve this question














      I try to deploy a Laravel repo on AWS Elastic Beanstalk. For this I've created a PHP environment on a t2.medium instance and initialized a deployment with AWS CodePipeline.



      I need to run npm and gulp on production for creating my static assets, but unfortunately I'm not able to run NPM because of an old NodeJS version installed. It's 0.10.46-1nodesource.el7.centos.



      At the moment I'm using two config scripts to install NodeJS 10.X, run the migrations and gulp:



      First:



      commands:
      01getNodeRepo:
      command: "curl --silent --location https://rpm.nodesource.com/setup_10.x | bash -"
      02installNode:
      command: "yum install -y nodejs"
      03updateNpm:
      command: "npm install npm -g"
      04enableSudo:
      command: "echo Defaults:root \!requiretty >> /etc/sudoers"


      Second:



      container_commands:
      01artisanMigrate:
      command: "php artisan migrate --force"
      02showNodeVersion:
      command: "node -v"
      03showNpmVersion:
      command: "npm -v"
      04npmInstall:
      command: "sudo npm install"
      05gulp:
      command: "sudo ./node_modules/.bin/gulp --production"


      Here is an extract from my log files which shows that AWS EB found two nodesource repos and will be using the old version:



      [2019-01-01T19:32:23.008Z] INFO  [1535]  - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Starting activity...
      [2019-01-01T19:32:25.314Z] INFO [1535] - [Application update code-pipeline-xx-xxx@17/AppDeployStage0/EbExtensionPreBuild/Infra-EmbeddedPreBuild/xxxx/Command 02installNode] : Completed activity. Result:
      Loaded plugins: priorities, update-motd, upgrade-helper
      Repository nodesource is listed more than once in the configuration
      Repository nodesource-source is listed more than once in the configuration
      Resolving Dependencies
      --> Running transaction check
      ---> Package nodejs.x86_64 0:0.10.46-1nodesource.el7.centos will be installed
      --> Finished Dependency Resolution


      Any ideas how I can force the environment to use the new version? Thanks!







      node.js laravel amazon-web-services gulp amazon-elastic-beanstalk






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 2 at 9:26









      TorbenLTorbenL

      3771614




      3771614
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Got it. This was the solution: https://github.com/nodesource/distributions/issues/421#issuecomment-318560799



          rm -f /etc/yum.repos.d/nodesource-el.repo
          yum clean all
          yum -y remove nodejs
          yum -y install nodejs





          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%2f54003897%2felastic-beanstalk-laravel-cant-run-gulp-because-of-old-nodejs-version-0-10%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









            0














            Got it. This was the solution: https://github.com/nodesource/distributions/issues/421#issuecomment-318560799



            rm -f /etc/yum.repos.d/nodesource-el.repo
            yum clean all
            yum -y remove nodejs
            yum -y install nodejs





            share|improve this answer




























              0














              Got it. This was the solution: https://github.com/nodesource/distributions/issues/421#issuecomment-318560799



              rm -f /etc/yum.repos.d/nodesource-el.repo
              yum clean all
              yum -y remove nodejs
              yum -y install nodejs





              share|improve this answer


























                0












                0








                0







                Got it. This was the solution: https://github.com/nodesource/distributions/issues/421#issuecomment-318560799



                rm -f /etc/yum.repos.d/nodesource-el.repo
                yum clean all
                yum -y remove nodejs
                yum -y install nodejs





                share|improve this answer













                Got it. This was the solution: https://github.com/nodesource/distributions/issues/421#issuecomment-318560799



                rm -f /etc/yum.repos.d/nodesource-el.repo
                yum clean all
                yum -y remove nodejs
                yum -y install nodejs






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 2 at 9:42









                TorbenLTorbenL

                3771614




                3771614
































                    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%2f54003897%2felastic-beanstalk-laravel-cant-run-gulp-because-of-old-nodejs-version-0-10%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