Linked Questions

Popular Questions

Jenkins "Multibranch Pipeline Project" Tutorial Error

Asked by At

I'm following this tutorial on the Jenkins official docs.

This tutorial shows you how to use Jenkins to orchestrate building and testing a simple Node.js and React application with the Node Package Manager (npm), as well as deliver different outcomes for development and production purposes.

Everything was pretty straight forward, but I came across this error when I got to "Run your Pipeline on the production branch" portion of the guide, link here.

Error Received

+ sleep 1
+ ./node_modules/serve/bin/serve.js -c 0 -s build
/var/jenkins_home/workspace/Aviato-Team_production-OZ2WCGEMEZUSDYGKYBCG4BWFXFVS2KVB47HNPHOYCFLEP7JEO52Q/node_modules/serve/bin/serve.js:83

detect(port).then(async open => {
                  ^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.runMain (module.js:611:10)
    at run (bootstrap_node.js:387:7)
    at startup (bootstrap_node.js:153:9)

+ echo 193
+ set +x

Now...
Visit http://localhost:5000 to see your Node.js/React application in action.
(This is why you specified the "args -p 5000:5000" parameter when you
created your initial Pipeline as a Jenkinsfile.)

I followed their guide step by step, using their very own repository and setup code. The only thing I changed was that instead of creating a pipeline with Git, instead I'm using GitHub, as noted here in the guide.

When I navigate to http://localhost:5000 nothing shows up.

Some things to note (in case it helps):

  1. My docker is installed on Windows 10 OS
  2. I'm using GitHub as opposed to Git (already mentioned)
  3. Tutorial is using BlueOcean to create pipeline

How do I fix this error? I'm still learning and following this guide, so since this error is out of my control I'm not sure how to fix it.

Edit: My terminal on my Win10 machine is outputting this if it helps:

Apr 20, 2018 4:02:23 AM com.squareup.okhttp.internal.Platform$JdkWithJettyBootPlatform getSelectedProtocol
INFO: ALPN callback dropped: SPDY and HTTP/2 are disabled. Is alpn-boot on the boot class path?
Apr 20, 2018 4:04:40 AM org.jenkinsci.plugins.workflow.support.steps.input.POSTHyperlinkNote <init>
WARNING: You need to define the root URL of Jenkins
Apr 20, 2018 4:04:40 AM org.jenkinsci.plugins.workflow.support.steps.input.POSTHyperlinkNote <init>
WARNING: You need to define the root URL of Jenkins

Here's my GitHub if you want to see the production branch code.

Related Questions