deployment broken?

Hi, all my surge deployments stopped working.
I tried to deploy by writing the script by hand, and it failed because the version of node installed by using

    - nodejs
    - nodejs-legacy
    - npm

Is too outdated.
I reconfigured the build to install the latest node manually and deploy with a script, and both the manual deployment and the configured deployment worked (wtf).

I hypothesised a node version issue, so I remove the by-hand deployment and left the installation of node there. Deployment fails:

e[0K$ rvm $(travis_internal_ruby) --fuzzy do ruby -S gem install dpl
Successfully installed dpl-1.10.12
1 gem installed
e[33mInstalling deploy dependenciese[0m
Successfully installed dpl-surge-1.10.12
1 gem installed
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/travis/.npm/_logs/2019-07-31T12_20_41_407Z-debug.log

e[33mPreparing deploye[0m


The only way to get this back to a working state is to manually install the latest Node.js and surge. At this point, the deployment works.

        - "curl -sL | sudo -E bash -"
        - sudo apt-get install -y nodejs
        - sudo npm install --global surge

Note: Travis seems to be getting more and more fragile. I recently spent more time debugging my Travis builds than my software.

When reporting a problem, please include the build URL so that we can help you better. Thanks.

Here is a correctly configured build for which the surge deployment fails silently:

Here is a build with the same surge configuration, but with surge manually installed, that succeeds:


Somehow it is not installing the surge package; compare and

I tried duplicating this error, but I could not.

We rely on the presence of the command surge to decide whether or not we run npm install -g surge. Does your job somehow changed to recognize this command?

Uhmm… no. It’s a plain Java + Maven build. Is there any debug output that I can print after_success that may be of help?

which surge would help.

Here it is, version with manually installed surge:

Version with no manual intervention for surge install:

Only the former has surge installed according to which output.

Here’s another hypothesis: you are using language: bash on Xenial, and this image may (needs confirmation) not have a Node.js runtime that enables the surge package to be installed. And we are silently failing.

Sounds likely. I can switch some of the builds (but not all of them) to bionic, but the build should not fail silently anyway. Can you reproduce with language: bash and xenial?

Confirmed that. Compare build system info for Xenial with language: shell vs language: generic.

However, in language: generic, surge is still unavailable on PATH, even if I activate a Node.js installation, and I don’t see it installed anywhere in dpl v1 source.