pascalgn / npm-publish-action

GitHub action to automatically publish packages to npm
MIT License
221 stars 29 forks source link

error Couldn't publish package: "Can't answer a question unless a user TTY" #5

Closed lpoulter closed 4 years ago

lpoulter commented 4 years ago

Getting this error on Executing: yarn publish --non-interactive --new-version 0.1.3

error Couldn't publish package: "Can't answer a question unless a user TTY"

My .yaml file, unchanged from the example.

name: npm-publish
on:
  push:
    branches:
      - master # Change this to your default branch
jobs:
  npm-publish:
    name: npm-publish
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@master
      - name: Set up Node.js
        uses: actions/setup-node@master
        with:
          node-version: 10.0.0
      - name: Publish if version has been updated
        uses: pascalgn/npm-publish-action@51fdb4531e99aac1873764ef7271af448dc42ab4
        with: # All of theses inputs are optional
          tag_name: "v%s"
          tag_message: "v%s"
          commit_pattern: "^Release (\\S+)"
        env: # More info about the environment variables in the README
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
          NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} # You need to set this in your repo settings
pascalgn commented 4 years ago

Hm, good question. Have you possibly forgotten so setup the NPM_AUTH_TOKEN secret? Other than that, I currently don't have many ideas what else it could be. Does yarn give you any prompts when you try to publish locally?

tterb commented 4 years ago

@lpoulter I ran into the same issue and found that it was because I had two-factor authentication enabled for authentication and publishing in my npm account settings. I initially just checked that 2FA wasn't required on the package level, but appears that your account settings override the package authentication settings.

pascalgn commented 4 years ago

I think this might be fixed, but I'm not sure. As it's a long time since there was any activity here, I will close this issue for now, but if you have any new information or need any help, feel free to reopen it!

rzr commented 1 year ago

For the records 51fdb4531e99aac1873764ef7271af448dc42ab4 is no more usable

https://github.com/abandonware/node-bluetooth-hci-socket/pull/44#issuecomment-1354496353