-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
package.json scripts run with yarn run
fail to auth with npm
#5683
Comments
(Someone from yarn team feel free to explain more correctly 😅 ) If you need to run npm commands in yarn scripts that require auth, try logging in! 😄 |
@jamsinclair I just tried this out, and it worked! That being said, I'm a little confused as to why. If I run a yarn script that calls the In my instance, I ran into this because I publish from CI. Running |
Great question! I'm just as unsure. I encountered this problem as well on CI for one of my projects. Hopefully a Yarn team member can chime in whether this is a bug or intentional behaviour 🤞 |
This is still an issue for people (see sindresorhus/np#416), and so it would be great if someone could look into this. |
Ran into this issue as well - when using I found another workaround is to add
|
+1 seeing the same issue. I am trying to invoke publish script from package.json which in turn calls Yarn to publish package to a private registry. Workaround does not really help in this case. |
Workaround from another issue: #4475 (comment) |
Closing as in v2 we completely stopped reading |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
package.json scripts run with
yarn run
fail to auth withnpm
If the current behavior is a bug, please provide the steps to reproduce.
https://gist.github.com/mcous/0c62847401ed2dc5e230f38746f0c267
.npmrc
"who": "npm whoami"
npm run who
will workyarn run who
will fail withENEEDAUTH
yarn config set registry https://registry.npmjs.org
What is the expected behavior?
package.json
scripts should not fail to auth withnpm
if.npmrc
is set up correctlyPlease mention your node.js, yarn and operating system version.
The text was updated successfully, but these errors were encountered: