-
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
yarn install --production installs some dev packages #2703
Comments
Here are some additional details after debugging the code: The The When requests:
[ PackageRequest {
parentRequest: undefined,
lockfile: [Object],
registry: 'npm',
reporter: undefined,
resolver: [Object],
optional: false,
pattern: 'chai@3.5.0',
config: [Object] },
PackageRequest {
parentRequest: [Object],
lockfile: [Object],
registry: 'npm',
reporter: undefined,
resolver: [Object],
optional: false,
pattern: 'chai@>=1.9.2 <4.0.0',
config: [Object] } ], The first element of the array represents the module specified in The problem is that at this point we don't check if the requests (PackageRequest objects) are coming from other ignored packages or not. |
To summarize, the issue happens when (1) in our "dependencies": {
"A": "0.0.1"
},
"devDependencies": {
"B": "0.0.1",
"C": "0.0.1"
} (2) The "dependencies": {
"B": "0.0.1"
} then:
will install package B (+its dependecies) |
Dupe of #2304 ? |
It is in fact the same issue as #2304. This one includes the in-depth analysis of the problem. I will close it and put some comments in the original issue. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
yarn install --production
installs some of the packages fromdevDependencies
intonode_modules
directoryIf the current behavior is a bug, please provide the steps to reproduce.
package.json
To reproduce, please create the
package.json
file with the above content and run:What is the expected behavior?
Expected behavior - node_modules doesn't contain the
chai
module:Please mention your node.js, yarn and operating system version.
My environment: OSX 10.11.6
$ uname -a Darwin tomasz 15.6.0 Darwin Kernel Version 15.6.0: Thu Sep 1 15:01:16 PDT 2016; root:xnu-3248.60.11~2/RELEASE_X86_64 x86_64 $ yarn --version 0.20.3 node --version v7.5.0 npm --version 4.1.2
The text was updated successfully, but these errors were encountered: