-
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 list
shows devDependencies on a production install.
#3788
Comments
@pixelpax Thanks for reporting this, I'm able to reproduce this in my local environment. Happy to work on this. @bestander a little help on this? |
@gowthamgts, that is great. |
Is this still open for a commit? If so, I'd like to take this and push a PR for this issue. |
Yes @reznord, I'm caught up with work, so would be great if you take this up. |
Jumped in on this one, hope that's okay @reznord |
It's fine :) |
I boot a production version of my container with a Dockerfile that includes commands
Do you want to request a feature or report a bug?
I believe this is a bug as I receive misleading information.
What is the current behavior?
I have a container built from an image with the following in its Dockerfile
I am expecting it to be building in production and ignoring devDependencies. It does so, and I can confirm this with
ls node_modules
however, when I doyarn ls
I see devDependencies listed alongside.If the current behavior is a bug, please provide the steps to reproduce.
In your package.json:
then do
NODE_ENV=production; yarn; yarn list | grep nodemon;
and note that nodemon is present in list, but not present in
node_modules
What is the expected behavior?
In this way, yarn is showing me a list of packages which I don't actually have stored on my machine. Perhaps this is intentional because I also see a list of packages before executing
yarn
to install mypackage.json
. I would expect to look in my package.json if I wanted to see what packages should be installed and to useyarn list
to see what packages are actually installed. This is also what I'm used to withnpm
.Please mention your node.js, yarn and operating system version.
Using yarn v0.24.6 within a docker container (from node:6.11 official)
The text was updated successfully, but these errors were encountered: