# NPM deploy fails always on travis-ci.com

**URL:** <https://travis-ci.community/t/npm-deploy-fails-always-on-travis-ci-com/7704>\
**Category:** Deployment\
**Created:** [March 22, 2020, 1:03am UTC](https://travis-ci.community/t/npm-deploy-fails-always-on-travis-ci-com/7704 "2020-03-22T01:03:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ionaru](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/ionaru/32/2045_2.png) [@Ionaru](https://travis-ci.community/u/Ionaru)\
**Post date:** [March 22, 2020, 1:03am UTC](https://travis-ci.community/t/npm-deploy-fails-always-on-travis-ci-com/7704/1 "2020-03-22T01:03:22Z")

</div>

Deploying a package automatically from a job on [travis-ci.com](http://travis-ci.com) always fails for me while the exact same config works fine on [travis-ci.org](http://travis-ci.org).

The error:

```auto
NPM API key format changed recently. If your deployment fails, check your API key in ~/.npmrc.
http://docs.travis-ci.com/user/deployment/npm/
~/.npmrc size: 48
env: ‘to’: No such file or directory

```

I created the API key like this:

```auto
travis login --pro
travis encrypt ...

```

My config:

```auto
language: node_js
node_js:
    - '12'

jobs:
    include:
        - stage: deploy
          node_js: "lts/*"
          script: skip
          deploy:
              - provider: npm
                email: info@saturnserver.org
                api_key:
                    secure: clSA+l0+pxr3QQ5LflbIh8smZprMeBJMcH6x4Im7Lb1o2nXIf/XvWw8//10ruuXZp0hpCFs/tpLMGdkDJ/8lT5EiXO5OUGETdbd5ocktmTGfAT00dneZB2rbwPlGPR7/d4QlZDH84qSJWL96GOy+GBoE1fCwRhxbJxZMm6EMEJ5gnXsSGu6JYwdTkSZ8D8ebXJwwFOk+CPQZBR2gjujW8ztaDAs073zE8RBMZH4xJ8RL3QxbUCw155BSldzGR5W27NcvjJAXVDxVQVr13dgGy/AMW0icfHD/S24nIgJ3nZa3BVkz5HaSE+0V0om+Iwmn33HYa+7oTzdYMQK99aSQFi5Jbe8SJUKYf0sYIgvcptHb7J4+29gncegDLaBBTxyld1rFN4P5R/nCiM7Leks6Qr2Gjl17oXf4jX+v6REgp+slX0pakcwEs9iBmIKAHXx7xJWfqYxrveTprPAhofLn3Tx6FgVjPdMM72bnddayqcycARblrF/7z2Y6f94ean3RJrVM6rRynwh+ZzgtLUyceoP35fUOa55qztoy1PhB/jliELz6Mv33OD3MFXuAuKEbFPv40/6tmbDpm9UWBY/IJluNCkEozXH78rzA/U476U1Ktp8iamDKbXMgHgE3X8eUQOOGzllDRms02n9WBV8FVQYWH/bf+lCjRWFh1Kg0sMQ=
                skip_cleanup: true
                on:
                    branch: master
                    repo: Ionaru/eslint-config
                    tags: true

```

What do I need to change for this to work? I like having all my projects in one place and I don’t mind migrating everything to [travis-ci.com](http://travis-ci.com), but it needs to work.

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [March 22, 2020, 3:40am UTC](https://travis-ci.community/t/npm-deploy-fails-always-on-travis-ci-com/7704/2 "2020-03-22T03:40:31Z")

</div>

> [@"Invalid or non-existent authentication information" on PyPI upload](https://travis-ci.community/t/invalid-or-non-existent-authentication-information-on-pypi-upload/3370/2):
>
> Try adding --pro to travis encrypt, if you are trying to build on [https://travis-ci.com](https://travis-ci.com). The encryption is working on .org; e.g., [https://travis-ci.org/ilyachch/md\_docs-trans-app/jobs/531698319](https://travis-ci.org/ilyachch/md_docs-trans-app/jobs/531698319)
