-
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 is broken, installs plenty of devDependencies #1379
Comments
i'm seeing the same issue, also with yarn 0.16.1, which is breaking my production builds |
Thanks for the report! |
If you actually hack I have tried to fix this, but I couldn't make sense of the code. With Why devDeps aren't completely dropped with If that is the case, then isn't it pretty unnecessary to do all this work for production environments? Could we make |
This would be a perfect solution in my workflow. |
See following output:
While clearly eslint-rules is listed as devDependencies. So it even fails on validation. |
Perhaps a duplicate of #761 ? |
Same happening for me, 'yarn install --production' tries to find a directory that is listed in 'devDependencies' and 'npm i --production' was not doing this. |
@troydemonbreun It's correlated |
With the current yarn version (0.17.6) and the provided package.json I can still see a discrepancy between npm and yarn. So it seems that this issue wasn't fixed by the other issues |
Fixed via #2116. |
@kittens I am still seeing this behavior with the |
I can see the issue still too. I renamed the node_modules folders after installation for comparison.
|
+1 for this, with Yarn 0.20.3 Edited to add: on at least one occasion, I have seen Yarn fail to install a production dependency with --prod as well. |
Same issue for me, causes a lot of problems with my build as dev dependencies contain things like custom linting rules which require SSH access to internal repos... |
Still seeing it myself. @kittens Could this be re-opened? Edit: Yarn v0.23.2 |
@isiahmeadows there was a fix in 0.23.1 (#2921), are you on latest? EDIT: You are 😭 What do you get with |
@SimenB I edited my comment with my version (v0.23.2). |
In my case, I have 0 dependencies and several dev dependencies. So anything installing to |
Oh, fancy |
Is this a case of doing |
@SimenB Here's a 100% repro on macOS:
|
You can also repro this with |
It's the latter case. |
Have same problems here: Could it be reopened? Or there is another opened issue?
|
how to install only production deps ? (ignore devDep) any solution for now ? |
From stack overflow : you can use
it does what you really want. |
I'm running yarn
0.16.1
. Given the followingpackage.json
,yarn
will install wrong dependencies:npm install --production
yields 71M ofnode_modules
yarn install --production
yields 340M ofnode_modules
- clearly wrongTo reproduce:
The text was updated successfully, but these errors were encountered: