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 tries to resolve devDependencies with --production flag #3263

Closed
mitchlloyd opened this issue Apr 26, 2017 · 1 comment
Closed

Yarn tries to resolve devDependencies with --production flag #3263

mitchlloyd opened this issue Apr 26, 2017 · 1 comment

Comments

@mitchlloyd
Copy link

mitchlloyd commented Apr 26, 2017

As of writing I'm on current version: 0.23.2.

Do you want to request a feature or report a bug?

I believe this is a bug because the behavior seems problematic and is different than the npm install behavior. However, perhaps there is something fundamentally different about how this should work with yarn and this is expected behavior.

What is the current behavior?

Given a package.json like this:

{
  "name": "yarn-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "devDependencies": {
    "foo": "http://npm-registry/123.tgz"
  }
}

running yarn install --production attempts to resolve this package in devDependencies:

yarn install v0.23.2
[1/4] 🔍  Resolving packages...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
warning There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "http://npm-registry/123.tgz: getaddrinfo ENOTFOUND npm-registry npm-registry:80".
info If you think this is a bug, please open a bug report with the information provided in "/Users/mitlloyd/projects/yarn-test/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

npm on the other hand does not try to resolve this dependency and succeeds.

What is the expected behavior?

yarn install does not try to reach "http://npm-registry/123.tgz".

Please mention your node.js, yarn and operating system version.

Node: 7.4.0
OS: Mac OS Sierra 10.12.4

@mitchlloyd
Copy link
Author

Just discovered #1115. So this seems like expected and required behavior.

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

1 participant