Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarn publish in a script requires user interaction #2445

Closed
jnfingerle opened this issue Jan 13, 2017 · 6 comments
Closed

yarn publish in a script requires user interaction #2445

jnfingerle opened this issue Jan 13, 2017 · 6 comments

Comments

@jnfingerle
Copy link

yarn publish (0.18.1, node 6.3.1, Windows) is no drop in replacement for npm publish when used in a script: Using an auth token in my .npmrc, npm publish runs without user interaction, yarn publish asks for a new version number. It would be greate to have a way to publish without interaction.

To answer the questions not yet asked: It's our in house sinopia and publishing is restricted to our build bot. Therefore the new version number is always checked in before publishing.

@vvo
Copy link

vvo commented Jan 17, 2017

I too would like to have a way to publish on npm using yarn, I already manage the version number bump in my scripts.

As a side note, npm publish inside a yarn release command that runs some shell script will fail on the auth part, only npm publish not run from a yarn subshell will work.

@ghost
Copy link

ghost commented Apr 28, 2017

Carrying on the conversation from #722, yarn publish prompts for a version, which means it can't be used as a drop in replacement for npm publish.

npm publish behavior is to use the value of the version field in package.json.

@ghost
Copy link

ghost commented Apr 28, 2017

Related to #2430

@ghost ghost mentioned this issue Apr 28, 2017
@rally25rs
Copy link
Contributor

Closing as a dup of #610 since the longer conversation is held there.

ahuth pushed a commit to mavenlink/mavenlint that referenced this issue Jan 14, 2018
This is really annoying. Generally we want to use `yarn` instead of `npm`.

However, when running `lerna publish`, if it uses `yarn publish` that command will try to prompt the user for a version number, which breaks when running from the lerna script.

See yarnpkg/yarn#2445 for details. Can't really find any other reports of the issue, especially from the `lerna` side of things.
@lehni
Copy link

lehni commented Jun 9, 2018

@rally25rs I don't see any mention of this particular problem (yarn publish requiring input for the password) in #610, so was this perhaps closed in error? I am still facing this issue, in conjunction with lerna/lerna#1200

@rally25rs
Copy link
Contributor

@lehni the original post states

yarn publish asks for a new version number. It would be greate to have a way to publish without interaction.

which is mentioned in comment #610 (comment) which is why I closed it as a duplicate.

If you could add a comment to #610 for the password issue, it would be helpful. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants