-
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" brings in dev dependency deps to node_modules #6323
Comments
Can confirm, am having this same problem. A similar issue was posted and resolved a while ago #3577 I'm using Workspaces and local file dependencies (Lerna uses local file dependencies under the hood, too). |
I'm not familiar with the inner-workings of yarn, but it seems that using the --production flag causes the Here are some various pieces of information about dir size and dependency inclusion:
Command to add moduleA to moduleB ( assume package name is moduleA and file path is also ./packages/moduleA).
|
thanks for further info @ajhool! We are not actually using workspaces or local file deps and still having this issue. It's causing multiple versions of React in our bundled code and breaking things. |
Confirmed this is occurring with v1.13.0 |
any update? |
Still happening with v1.21.1. |
What does the |
Still happening with v1.21.1. |
Is there any temporary solution to navigate this problem in the interim of a permanent solution? |
I hate to be the "+1" guy, but using |
I'd never really run yarn with |
Thanks @rally25rs - I've been running |
FWIW, this is still an issue.
^ totally installs all devDependencies
|
Closing as fixed in v2 |
What is the current behaviour?
I run
yarn install --production
and it brings in react and react-dom to the top of node_modules even though react and react-dom is a dep of a dev dep. This is proved byyarn why
below. I also manually checked all package.json's in node_modules folder (after prod install) to see if react/react-dom existed as dep, it did not. The issue does not occur withnpm install --production
. I also want to clarify this is not the same as #3630, these deps are actually wrongly appearing node_modules.If the current behavior is a bug, please provide the steps to reproduce.
Unfortunately we have private npm modules, so not entirely possible. Here is the yarn.lock and the repos package.json. I could provide private package.json's if this helps or any other suggestions.
What is the expected behavior?
react and react-dom will not appear in node_modules/react and node_modules/react-dom.
Please mention your node.js, yarn and operating system version.
Latest of everything
macOS 10.13.3
yarn 1.9.4 (even happened in yarn nightly
1.10.0-20180828.1752
)node v8.11.4
The text was updated successfully, but these errors were encountered: