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
addons:
apt:
packages:
- 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
travis_time:end:234a0668:start=1564575634511190604,finish=1564575636208663933,duration=1697473329
e[0Ktravis_fold:end:dpl_1
e[0Ktravis_time:start:10973e9b
e[0Ktravis_fold:start:dpl.1
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
travis_fold:end:dpl.1
travis_fold:start:dpl.2
e[33mPreparing deploye[0m
travis_fold:end:dpl.2
travis_fold:start:dpl.3
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.
install:
- "curl -sL https://deb.nodesource.com/setup_12.x | 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.