Skip to content
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 removing folder within installed dependency #2608

Closed
jamesmosier opened this issue Feb 1, 2017 · 2 comments
Closed

Yarn removing folder within installed dependency #2608

jamesmosier opened this issue Feb 1, 2017 · 2 comments

Comments

@jamesmosier
Copy link

Bug

I am using Yarn v0.19.1 to install some dependencies. I deleted my node_modules folder completely and did a fresh yarn install.

I am trying to install the dependency leaflet using yarn add leaflet (also tried just yarn when leaflet is present in my package.json. The module installs successfully, except during the Cleaning Modules... phase, Yarn removes the images folder which would typically live within leaflet/dist/images. When I do a npm install leaflet this folder does not get removed.

During a yarn install, the images folder is present until the Cleaning modules phase happens.

I checked the package.json in the leaflet library and nothing seemed out of the ordinary there. It runs a jake file, but even within that file nothing is being deleted related to images.

I don't believe this is a leaflet issue, but if it is I can direct this issue their way.

Here is what the folder looks like, within my node_modules folder, for both package manager installs:

Yarn
image

NPM
image

Reproduction steps

Not working

  1. yarn add leaflet
  2. View the node_modules/leaflet/dist folder
  3. Notice no images folder

Working

  1. npm install leaflet
  2. View the node_modules/leaflet/dist folder
  3. Notice a folder named images with image files (.png) inside

Expected behavior

The images folder should be present within the leaflet/dist folder

Versions

Node v.7.4.0
Yarn v0.19.1
OS X 10.11.6

@jamesmosier
Copy link
Author

There was a .yarnclean file in my project. This added some files/folders to ignore when installing dependencies. Running yarn clean added this file and I wasn't aware until I saw this issue. Viewing the docs also gave the same info.

I resolved this by removing images from the set of ignored directories.

@sixinli
Copy link

sixinli commented Apr 1, 2017

hitting this a couple of times already... removing .yarnclean works but it does seem like yarn clean is removing files a bit too aggressively - the resource files (.png, .svg, etc) are actually referenced by other files and shouldn't be removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants