kutt
kutt copied to clipboard
Does not start due to error: `caniuse-lite is outdated`
This started to happen only a couple of days ago. Without any change when starting the server (I am using a container), I get this:
> [email protected] start /usr/src/app
> npm run migrate && cross-env NODE_ENV=production node production-server/server.js
> [email protected] migrate /usr/src/app
> knex migrate:latest --env production
Requiring external module @babel/register
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
Using environment: production
Already up to date
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `npm run migrate && cross-env NODE_ENV=production node production-server/server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-07-01T23_15_28_515Z-debug.log
If I run: npx browserslist@latest --update-db, it takes a while but then a subsequent npm start just works fine.
yes this is an issue @hammady when starting the server in dev env
But I'm starting it in production. Please see the logs above.
I am currently running kutt from a custom Dockerfile where I run the update command on every container startup until this is fixed:
# Dockerfile
ARG tag=2.7.2
FROM kutt/kutt:$tag
COPY update-and-start.sh /home/
CMD ["/home/update-and-start.sh"]
And:
# update-and-start.sh
#!/usr/bin/env bash
npx browserslist@latest --update-db
npm start