I got the same error. I am newbee to Travis.
My .travis.yml
{
"language": "node_js",
"os": [
"linux"
],
"dist": "Focal Fossa",
"node_js": [
"stable"
],
"cache": {
"directories": [
"$HOME/.npm",
"node_modules",
"packages/*/node_modules"
]
},
"before_install": [
"BRANCH=$(echo ${TRAVIS_BRANCH} | sed -e 's/\\(.*\\)/\\L\\1/' | sed -r 's/[^a-z0-9-]/-/g')",
"npm config set //registry.npmjs.org/:_authToken=${NPM_TOKEN}"
],
"before_script": [
"DEBUG=eslint:cli-engine npm run lint:all",
"npm run build:quick"
],
"deploy": [
{
"provider": "script",
"script": "npm run publish:release -- $TRAVIS_TAG --yes",
"skip_cleanup": true,
"on": {
"branch": [
"masterkup"
],
"tags": false,
"repo": "blog_mongo"
}
},
{
"provider": "script",
"script": "npm run publish:release -- --canary --preid=$BRANCH.$TRAVIS_JOB_NUMBER --dist-tag=$BRANCH --yes",
"skip_cleanup": true,
"on": {
"tags": true,
"repo": "blog_mongo"
}
}
],
"after_success": [
"npm run test:coverage"
]
}