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 not install dependencies correctly #3099

Closed
mark86092 opened this issue Apr 11, 2017 · 3 comments
Closed

Yarn not install dependencies correctly #3099

mark86092 opened this issue Apr 11, 2017 · 3 comments

Comments

@mark86092
Copy link

mark86092 commented Apr 11, 2017

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

bug

What is the current behavior?
Prepare a package.json

{
  "dependencies": {
    "request": "^2.81.0"
  },
  "devDependencies": {
    "co": "^4.6.0"
  }
}

Run NODE_ENV=production yarn install

Expect co still install as dependency of request, but not

image

If the current behavior is a bug, please provide the steps to reproduce.

  1. Prepare package.json in your folder (only this file)
{
  "dependencies": {
    "request": "^2.81.0"
  },
  "devDependencies": {
    "co": "^4.6.0"
  }
}

image

  1. Run NODE_ENV=production yarn install

image

  1. Run a node, and require('request') fails

image

What is the expected behavior?

I install via NODE_ENV=production npm install

image

Run a node, and require('request') works

image

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

node: v7.8.0
yarn: 0.22.0
os: mac

and tested on

node: v6.10.0
yarn: 0.21.3
os: linux ubuntu 16.04.2

tested on docker, too

image

other information

image

I'm not sure whether I misunderstand NODE_ENV or not, but the current behavior forces me to move the co to my production dependencies

If duplicated, close this

Thanks you for reading

@hackape
Copy link

hackape commented Apr 12, 2017

This is actually a FEATURE™ not a bug, read here. But I was preparing to file same issue like you, @mark86092 bro. This is clearly over designed.

Please, yarn team, consider remove this feature, just keep the --prod flag that's enough.

@vizath
Copy link

vizath commented Apr 12, 2017

Can you try with 0.23.1? see #2921

@mark86092
Copy link
Author

Great, thanks @vizath

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

3 participants