I want to run Renovate inside a a Ubuntu 20.04 docker container, but renovate does not seem to work. Here are the step to repdocue my setting:
docker run -it ubuntu:20.04 /bin/bash
apt update
apt upgrade
printf 'yn1n1n' | apt install nodejs
apt install -y npm
npm install -g renovate
renovate --version
renovate --version
gives me:
/usr/local/lib/node_modules/renovate/dist/logger/index.js:13
let logContext = process.env.LOG_CONTEXT ?? (0, nanoid_1.nanoid)();
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/renovate/dist/renovate.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
root@3b484953056f:/# renovate --version
/usr/local/lib/node_modules/renovate/dist/logger/index.js:13
let logContext = process.env.LOG_CONTEXT ?? (0, nanoid_1.nanoid)();
^
SyntaxError: Unexpected token ?
at Module._compile (internal/modules/cjs/loader.js:723:23)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (/usr/local/lib/node_modules/renovate/dist/renovate.js:5:18)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
Any ideas what I am doing wrong here? Do I need to setup RENOVATE_LOG_CONTEXT
? If so, how can this be done?
2
Answers
renovate github discussions is more active than this, you should try there next time.
you should look into github repository, check this repository out for ubuntu example:
https://github.com/renovatebot/docker-ubuntu/blob/master/Dockerfile
Check the node and git versions. Must be updated or will get that error.