Skip to content

Yarn not install dependencies correctly #3099

Description

@mark86092

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions