Do you want to request a _feature_ or report a _bug_?
Bug
What is the current behavior?
I am using a private npm registry. I have following defined in my .npmrc file of the project.
registry=http://***.com/nexus/content/groups/npm-all/
email=***@**.**
_auth=***
optional=false
cafile=***
strict-ssl=false
@types:registry=https://registry.npmjs.com
I have an internal dependent module which is available in private registry. It in turn have a dependency of @types\chalk at some level. My problem is I was able to generate yarn.lock file without any error for that internal dependent module. But when that internal module is being used as dependency in other repository, I am getting following error.
Trace:
Error: https://registry.npmjs.com/@types%2fnode: User not found
at Request.params.callback [as _callback] (/***/npm-globals/lib/node_modules/yarn/lib-legacy/util/request-manager.js:306:18)
at Request.self.callback (/***/npm-globals/lib/node_modules/yarn/node_modules/request/request.js:187:22)
at emitTwo (events.js:87:13)
at Request.emit (events.js:172:7)
at Request.<anonymous> (/***/npm-globals/lib/node_modules/yarn/node_modules/request/request.js:1048:10)
at emitOne (events.js:77:13)
at Request.emit (events.js:169:7)
at IncomingMessage.<anonymous> (/***/npm-globals/lib/node_modules/yarn/node_modules/request/request.js:969:12)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
If the current behavior is a bug, please provide the steps to reproduce.
What is the expected behavior?
There should not be any error.
Please mention your node.js, yarn and operating system version.
node.js v4.4.7
yarn v0.16.1
Windows 7 OS
Just checked that I am getting same error for internal module as well. Looks like the .npmrc's line
@types:registry=https://registry.npmjs.com
is not working.
After lot of checking, I can confirm you error is being reproduced if .npmrc have email & _auth for packages like @types\chalk etc. npm shrinkwrap is working fine.
I would like to confirm that I ran also in exactly the same issue, I use yarn 0.18.1 and after commenting out two lines of code it started to work:
strict-ssl = false
@filamentgroup:registry=http://registry.npmjs.org/
registry=https://corp.com/nexus/content/groups/npm-all/
init.author.name=Mateusz
[email protected]
init.author.url=
#[email protected]
strict-ssl=false
color=false
cache-lock-stale=3600000
cache-lock-wait=20000
cache-lock-retries=20
#_auth=some_key
After commenting out _auth and email lines yarn install was successful.
I'm having this issue too; however, I need a .npmrc in my home directory with _auth info for the private registry. I've tried to override this with the following lines in the project .npmrc:
# Sample .npmrc that isn't working for me
@gulp-sourcemaps:registry=https://registry.yarnpkg.com/
//registry.yarnpkg.com:always-auth=false
//registry.yarnpkg.com:email=
//registry.yarnpkg.com:_auth=
I keep getting this cryptic error:
error An unexpected error occurred: "https://registry.yarnpkg.com/@gulp-sourcemaps%2fmap-sources: User not found".
Does this mean that the gulp-sourcemaps user isn't being found? Or the user from my root .npmrc isn't being found (from email value)? I'm forced to use npm instead of yarnpkg until this is resolved.
@r24y I had the same problem. Put the following in your project's .npmrc file:
```
email=
_auth=
````
I too am having this problem.
_auth is gone now: https://github.com/npm/npm/issues/16528#issuecomment-304996146
Why does the presence of _auth break yarn?
It doesn't break yarn. NPM registry simply rejects this header/option.
Excepting for private repository needed as your project requires, you should temporarily remove /User/.npmrc and re-run the command to create the project without the issue.
It doesn't break yarn. NPM registry simply rejects this header/option.
is there a way I can set yarn to ignore .npmrc config and accept only .yarnrc config?
Most helpful comment
@r24y I had the same problem. Put the following in your project's .npmrc file:
```
email=
_auth=
````