Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-60814

NPM Install -- 'Execute shell' marked build as failure

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Blocker
    • Resolution: Unresolved
    • Component/s: pipeline
    • Environment:
    • Similar Issues:

      Description

      I have setup Jenkins with "Install suggested plugins".
      I have created a Job with details below

      1. Source Code Management : GIT to checkout my master branch
        • Checkout my code as sub-directory
      2. Build - Execute Shell
        • sudo rm -rf /home/folder/backend
          sudo mv $WORKSPACE/backend /home/folder/
          cd /home/folder
          sudo chown newuser:newuser -R *
          cd backend
          sudo npm install --unsafe-perm=true --allow-root
      1. Result when I run my Job
        • 07:13:50 + cd /home/folder
          07:13:50 + sudo chown newuser:newuser -R *
          07:13:50 + cd backend
          07:13:50 + sudo npm install --unsafe-perm=true --allow-root
          07:13:54 npm WARN deprecated superagent@3.8.3: Please note that v5.0.1+ of superagent removes User-Agent header by default, therefore you may need to add it yourself (e.g. GitHub blocks requests without a User-Agent header).  This notice will go away with v5.0.2+ once it is released.
          07:14:00 npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
          07:14:23 
          07:14:23 > bcrypt@3.0.7 install /home/folder/backend/node_modules/bcrypt
          07:14:23 > node-pre-gyp install --fallback-to-build
          07:14:23 
          07:14:23 
          07:14:23 Build step 'Execute shell' marked build as failure
          07:14:23 [WS-CLEANUP] Deleting project workspace...
          07:14:23 [WS-CLEANUP] Deferred wipeout is used...
          07:14:23 [WS-CLEANUP] done
          07:14:23 Finished: FAILURE

        Attachments

          Activity

          Hide
          zbynek Zbynek Konecny added a comment -

          Looks like npm install finished with nonzero exit code. You can try logging in to the machine and running
          sudo npm install --unsafe-perm=true --allow-root --verbose
           This is more likely a problem with an NPM module or missing dependencies on the server (node gyp requires some native libraries) than with Jenkins itself.

          Show
          zbynek Zbynek Konecny added a comment - Looks like npm install finished with nonzero exit code. You can try logging in to the machine and running sudo npm install --unsafe-perm=true --allow-root --verbose  This is more likely a problem with an NPM module or missing dependencies on the server (node gyp requires some native libraries) than with Jenkins itself.
          Hide
          2rohith2 Rohith Kumar added a comment -

          Zbynek Konecny Thanks for the reply.
          I will try and update here.

          Show
          2rohith2 Rohith Kumar added a comment - Zbynek Konecny Thanks for the reply. I will try and update here.

            People

            • Assignee:
              hackerbuddy Buddhika Chathuranga
              Reporter:
              2rohith2 Rohith Kumar
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: