# Node.js build fails with no obvious error

**URL:** https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961
**Category:** Windows
**Created:** [November 17, 2018, 4:39pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961 "2018-11-17T16:39:56Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![michaelmior](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/michaelmior/32/487_2.png) [@michaelmior](https://travis-ci.community/u/michaelmior)
#### Post date: [November 17, 2018, 4:39pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/1 "2018-11-17T16:39:56Z")

</div>

I have a [build using Node.js on Windows](https://travis-ci.com/michaelmior/relational-playground/jobs/159284516) and it errors out immediately after `nvs use` but there’s no obvious error.

---

<div class="post-metadata">

### Author: ![hunterlester](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/hunterlester/32/528_2.png) [@hunterlester](https://travis-ci.community/u/hunterlester)
#### Post date: [November 22, 2018, 7:15pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/2 "2018-11-22T19:15:09Z")

</div>

@michaelmior I had the same exact issue. Same as you I had an secure environment variable defined in settings: [https://travis-ci.org/hunterlester/safe\_browser/jobs/458529411](https://travis-ci.org/hunterlester/safe_browser/jobs/458529411)

 ![travis-build](https://us1.discourse-cdn.com/flex015/uploads/travis_ci/original/1X/87ee14e79218032585af026b16534590bc3aff7e.png)

Once I deleted the env var in my settings then the [build went on as usual](https://travis-ci.org/hunterlester/safe_browser/builds/458532591).  
Of course I’m unable to deploy to Github but at least it’s documented now.  
I’m able to set a non-secure env var though.

Hopefully Travis team is tracking these threads?

---

<div class="post-metadata">

### Author: ![michaelmior](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/michaelmior/32/487_2.png) [@michaelmior](https://travis-ci.community/u/michaelmior)
#### Post date: [November 23, 2018, 3:29pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/3 "2018-11-23T15:29:04Z")

</div>

Thanks @hunterlester! I didn’t think to check any connection with the environment variables. In my case, testing on Windows isn’t really critical so I just set `allow_failures` for now and I’m hoping I’ll see it go green in the future 🙂

---

<div class="post-metadata">

### Author: ![JannisX11](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/jannisx11/32/862_2.png) [@JannisX11](https://travis-ci.community/u/JannisX11)
#### Post date: [January 2, 2019, 2:30pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/4 "2019-01-02T14:30:46Z")

</div>

I am getting the same error:  
[https://travis-ci.org/JannisX11/blockbench/jobs/474419013](https://travis-ci.org/JannisX11/blockbench/jobs/474419013)  
Is there any way I can fix it? I can’t get rid of the GH-Token variable because it is required to upload the builds to Github.

---

<div class="post-metadata">

### Author: ![fenos](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fenos/32/885_2.png) [@fenos](https://travis-ci.community/u/fenos)
#### Post date: [January 2, 2019, 2:53pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/5 "2019-01-02T14:53:19Z")

</div>

We are all sharing the same pain 🤪

---

<div class="post-metadata">

### Author: ![tibovanheule](https://avatars.discourse-cdn.com/v4/letter/t/71c47a/32.png) [@tibovanheule](https://travis-ci.community/u/tibovanheule)
#### Post date: [January 3, 2019, 4:47pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/6 "2019-01-03T16:47:17Z")

</div>

Have you tried to place the variable before the command that requires it?  
Because that did the trick for me 😉

---

<div class="post-metadata">

### Author: ![fenos](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fenos/32/885_2.png) [@fenos](https://travis-ci.community/u/fenos)
#### Post date: [January 4, 2019, 9:30am UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/7 "2019-01-04T09:30:06Z")

</div>

@tibovanheule secure environment variables are set from the build settings on the UI.  
Are you sure, you are using secure variables?

---

<div class="post-metadata">

### Author: ![zennermac](https://avatars.discourse-cdn.com/v4/letter/z/8dc957/32.png) [@zennermac](https://travis-ci.community/u/zennermac)
#### Post date: [January 9, 2019, 3:19pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/8 "2019-01-09T15:19:03Z")

</div>

Hey guys

I am experiencing the exact same issue and can confirm, removal of the secure environment variable from the settings fixes the build however as @JannisX11mentioned this prevents automatically uploading builds to Github.

Can anyone on the Windows team comment on timeframe for a fix for this as its a real blocker in my opinion.

---

<div class="post-metadata">

### Author: ![StefanScherer](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/stefanscherer/32/928_2.png) [@StefanScherer](https://travis-ci.community/u/StefanScherer)
#### Post date: [January 10, 2019, 7:23am UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/9 "2019-01-10T07:23:28Z")

</div>

First thanks for starting Windows support on Travis!

I tried `language: node_js` but immediatelly running into an issue [https://travis-ci.org/StefanScherer/travis-windows-test/builds/477693171](https://travis-ci.org/StefanScherer/travis-windows-test/builds/477693171) with nvs even before my first script command.

My `.travis.yml` looks like this

```auto
os: windows
language: node_js
services: docker

script:
  - docker version
  - docker images
  - npm install -g rebase-docker-image
  - rebase-docker-image -h

```

---

<div class="post-metadata">

### Author: ![lane-c-wagner](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@lane-c-wagner](https://travis-ci.community/u/lane-c-wagner)
#### Post date: [February 3, 2019, 6:00am UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/10 "2019-02-03T06:00:44Z")

</div>

Same problem ☹ No fixes yet?

---

<div class="post-metadata">

### Author: ![lidel](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/lidel/32/1237_2.png) [@lidel](https://travis-ci.community/u/lidel)
#### Post date: [February 19, 2019, 12:00pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/11 "2019-02-19T12:00:14Z")

</div>

If it helps, the error does not suggest issue with env variable, instead it looks like an odd version mismatch:

- `.travis.yml` has `node_js` defined as `10.15.1`
- `nvs` ignores `10.15.1` and downloads `10.12.0` instead:

```bash
Downloading bootstrap node from https://nodejs.org/dist/v10.12.0/node-v10.12.0-win-x64.7z

```

Then silently fails.

I can confirm the error goes away if I remove secure environment variable as suggested in:

> [@Node.js build fails with no obvious error](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/2):
>
> @michaelmior I had the same exact issue. Same as you I had an secure environment variable defined in settings: [https://travis-ci.org/hunterlester/safe\_browser/jobs/458529411](https://travis-ci.org/hunterlester/safe_browser/jobs/458529411) Once I deleted the env var in my settings then the [build went on as usual](https://travis-ci.org/hunterlester/safe_browser/builds/458532591). Of course I’m unable to deploy to Github but at least it’s documented now. I’m able to set a non-secure env var though. Hopefully Travis team is tracking these threads?

---

<div class="post-metadata">

### Author: ![BanzaiMan](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/banzaiman/32/67_2.png) [@BanzaiMan](https://travis-ci.community/u/BanzaiMan)
#### Post date: [February 19, 2019, 1:57pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/12 "2019-02-19T13:57:28Z")

</div>

> [@lidel](#):
>
> the error does not suggest issue with env variable, instead it looks like an odd version mismatch

This assessment is incorrect. `nvs` needs a known working Node.js installation to bootstrap, and it uses 10.12.0 at the moment. After that, it will install the desired version.

---

<div class="post-metadata">

### Author: ![bret](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/bret/32/1327_2.png) [@bret](https://travis-ci.community/u/bret)
#### Post date: [March 6, 2019, 3:14am UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/13 "2019-03-06T03:14:13Z")

</div>

Just ran into the issue and it looks like there is no real solution. I can’t turn off secure variables though. Oh well ☹

---

<div class="post-metadata">

### Author: ![elniallo](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@elniallo](https://travis-ci.community/u/elniallo)
#### Post date: [April 12, 2019, 6:45am UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/14 "2019-04-12T06:45:33Z")

</div>

Also ran into the same issue with a secure env variable set

---

<div class="post-metadata">

### Author: ![nick-strohm](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/nick-strohm/32/1731_2.png) [@nick-strohm](https://travis-ci.community/u/nick-strohm)
#### Post date: [May 1, 2019, 2:00pm UTC](https://travis-ci.community/t/node-js-build-fails-with-no-obvious-error/961/15 "2019-05-01T14:00:27Z")

</div>

_bump_  
thats still an issue sadly: [https://travis-ci.com/nick-strohm/SatisfactoryModLauncher/builds/110245557](https://travis-ci.com/nick-strohm/SatisfactoryModLauncher/builds/110245557)
