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 stops with an error and removes ALL files recursively in the current directory #1057

Closed
GrigoryPtashko opened this issue Oct 14, 2016 · 16 comments

Comments

@GrigoryPtashko
Copy link

Do you want to request a feature or report a bug?

Bug.

What is the current behavior?

That was really unexpected. I've issued yarn and and after it stopped with an error I see that all the files in the current directory are removed recursively.

Here's the error with which yarn stopped and removed all the files:

macbook@terminalx ~/work/tmp/forms (master)$ l
total 56
drwxr-xr-x  12 macbook  staff   408B 14 окт 16:31 ./
drwxr-xr-x  18 macbook  staff   612B 14 окт 16:27 ../
-rw-r--r--   1 macbook  staff   420B 14 окт 16:27 .editorconfig
-rw-r--r--   1 macbook  staff    48B 14 окт 16:27 .eslintignore
drwxr-xr-x  12 macbook  staff   408B 14 окт 16:35 .git/
-rw-r--r--   1 macbook  staff   120B 14 окт 16:31 .gitignore
-rw-r--r--   1 macbook  staff    31B 14 окт 16:30 README.md
drwxr-xr-x   2 macbook  staff    68B 14 окт 16:27 lib/
-rw-r--r--   1 macbook  staff   2,1K 14 окт 16:27 package.json
drwxr-xr-x   3 macbook  staff   102B 14 окт 16:27 src/
-rw-r--r--   1 macbook  staff   1,8K 14 окт 16:27 webpack.dev.config.js
-rw-r--r--   1 macbook  staff   1,6K 14 окт 16:27 webpack.prod.config.js
macbook@terminalx ~/work/tmp/forms (master)$ yarn
yarn install v0.15.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning Unmet peer dependency "file-loader@*".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
error Couldn't find a package.json (or bower.json) file in /Users/macbook/Documents/work/tmp/forms
    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
    at next (native)
    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
    at run (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:87:22)
    at /usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:100:28
    at flush (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/_microtask.js:18:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
macbook@terminalx ~/work/tmp/forms $ l
total 312
drwxr-xr-x    4 macbook  staff   136B 14 окт 16:36 ./
drwxr-xr-x   18 macbook  staff   612B 14 окт 16:27 ../
drwxr-xr-x  667 macbook  staff    22K 14 окт 16:36 node_modules/
-rw-r--r--    1 macbook  staff   154K 14 окт 16:36 yarn.lock
macbook@terminalx ~/work/tmp/forms $ 

Here's the exact same repo I use for the repro. I was lucky that I tried yarn on a newly created project that I was going to turn into a library.

Clone the repo https://github.com/GrigoryPtashko/yarn-removes-all-recursively

yarn and you will find that it deletes all the files.

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?

Please mention your node.js, yarn and operating system version.

macbook@terminalx ~/work/tmp/forms $ uname -a
Darwin terminalx.local 15.6.0 Darwin Kernel Version 15.6.0: Mon Aug 29 20:21:34 PDT 2016; root:xnu-3248.60.11~1/RELEASE_X86_64 x86_64
macbook@terminalx ~/work/tmp/forms $ node --version
v6.3.0
@Daniel15
Copy link
Member

I can't replicate this on Windows:

C:\src\yarn-removes-all-recursively>c:\src\yarn\bin\yarn
yarn install v0.15.0
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "file-loader@*".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 81.56s.

C:\src\yarn-removes-all-recursively>dir
 Volume in drive C is Windows
 Volume Serial Number is C6A7-A39E

 Directory of C:\src\yarn-removes-all-recursively

14/10/2016  10:31 AM    <DIR>          .
14/10/2016  10:31 AM    <DIR>          ..
14/10/2016  10:30 AM               439 .editorconfig
14/10/2016  10:30 AM                52 .eslintignore
14/10/2016  10:30 AM               134 .gitignore
14/10/2016  10:31 AM    <DIR>          node_modules
14/10/2016  10:30 AM             2,209 package.json
14/10/2016  10:30 AM                32 README.md
14/10/2016  10:30 AM    <DIR>          src
14/10/2016  10:30 AM             1,926 webpack.dev.config.js
14/10/2016  10:30 AM             1,689 webpack.prod.config.js
14/10/2016  10:31 AM           157,757 yarn.lock
               8 File(s)        164,238 bytes
               4 Dir(s)  134,540,574,720 bytes free

Having said that, this looks pretty bad. I don't have a Mac to test the behaviour on Mac OS.

@truckingsim
Copy link

truckingsim commented Oct 14, 2016

Just tried replicating this on linux and couldn't:

/var/www/yarn-removes-all-recursively ~ yarn
yarn install v0.15.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning Unmet peer dependency "file-loader@*".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 10.45s.

/var/www/yarn-removes-all-recursively ~ ls
total 220K
drwxrwxr-x   5 adam adam 4.0K Oct 14 16:20 .
drwxr-xr-x  27 adam adam 4.0K Oct 14 16:19 ..
-rw-rw-r--   1 adam adam  420 Oct 14 16:19 .editorconfig
-rw-rw-r--   1 adam adam   48 Oct 14 16:19 .eslintignore
drwxrwxr-x   8 adam adam 4.0K Oct 14 16:20 .git
-rw-rw-r--   1 adam adam  120 Oct 14 16:19 .gitignore
drwxrwxr-x 666 adam adam  20K Oct 14 16:20 node_modules
-rw-rw-r--   1 adam adam 2.1K Oct 14 16:19 package.json
-rw-rw-r--   1 adam adam   31 Oct 14 16:19 README.md
drwxrwxr-x   2 adam adam 4.0K Oct 14 16:19 src
-rw-rw-r--   1 adam adam 1.8K Oct 14 16:19 webpack.dev.config.js
-rw-rw-r--   1 adam adam 1.6K Oct 14 16:19 webpack.prod.config.js
-rw-rw-r--   1 adam adam 155K Oct 14 16:20 yarn.lock

Yarn version is v0.15.1, node and linux version below:

/var/www/yarn-removes-all-recursively ~ uname -a
Linux AdamUbuntu1404 3.19.0-66-generic #74~14.04.1-Ubuntu SMP Tue Jul 19 19:56:11 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

/var/www/yarn-removes-all-recursively ~ node --version
v6.3.0

As with Daniel15 I also don't have a mac machine to test this on, but figured I would add that this seems to be working correctly on linux.

@eknkc
Copy link
Contributor

eknkc commented Oct 14, 2016

Can't replicate on macOS Sierra + node 6.8.0 + yarn 0.15.1 either.

@Daniel15
Copy link
Member

Hmmm... @GrigoryPtashko, can you still replicate the problem if you create a fresh checkout of your repo (https://github.com/GrigoryPtashko/yarn-removes-all-recursively)? I'm very sorry you encountered this bug and would really like to fix it ASAP, but it's pretty hard to find the root cause since we're having difficulty replicating it 😢

What version of Mac OS are you on?

@GrigoryPtashko
Copy link
Author

@Daniel15

Yes. Look

macbook@terminalx ~/work/tmp/13 $ system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: OS X 10.11.6 (15G1004)
      Kernel Version: Darwin 15.6.0
      Boot Volume: MacOSX
      Boot Mode: Normal
      Computer Name: terminalx
      User Name: Grigory Ptashko (macbook)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
      Time since boot: 1 day 34 minutes

macbook@terminalx ~/work/tmp/13 $ git clone https://github.com/GrigoryPtashko/yarn-removes-all-recursively.git
Cloning into 'yarn-removes-all-recursively'...
remote: Counting objects: 13, done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 13 (delta 1), reused 13 (delta 1), pack-reused 0
Unpacking objects: 100% (13/13), done.
Checking connectivity... done.
macbook@terminalx ~/work/tmp/13 $ cd yarn-removes-all-recursively/
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively (master)$ yarn
yarn install v0.15.1
info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
warning Unmet peer dependency "file-loader@*".
[4/4] 📃  Building fresh packages...
success Saved lockfile.
error Couldn't find a package.json (or bower.json) file in /Users/macbook/Documents/work/tmp/13/yarn-removes-all-recursively
    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
    at next (native)
    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
    at run (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:87:22)
    at /usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:100:28
    at flush (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/_microtask.js:18:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $ l
total 312
drwxr-xr-x    4 macbook  staff   136B 15 окт 00:03 ./
drwxr-xr-x    3 macbook  staff   102B 15 окт 00:02 ../
drwxr-xr-x  667 macbook  staff    22K 15 окт 00:03 node_modules/
-rw-r--r--    1 macbook  staff   154K 15 окт 00:03 yarn.lock
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $ 

I think it is somehow possible to emulate the error and see how can that happen. If I were an author I guess I could understand how can that be possible. And second - no one tried on the OS X El Capitan so far and with the node version as I have..

@wmertens
Copy link

Could not repro on El Capitan with Node 6.7.

@GrigoryPtashko can you try mv ~/.yarn ~/yarn-suspect and try again? If that doesn't change things, try mv ~/.yarn-cache ~/yarn-cache-suspect which fill force downloading everything again.

It looks like one of the packages that you build removes all the files, which is weird (Ideally of course, packages are built in a sandbox, Nixpkgs has a great setup for that). So if that second mv fixes it, try copying it back and eliminating each package.

@GrigoryPtashko
Copy link
Author

@wmertens @Daniel15

Non of what you proposed did not work. I've removed the deps from the package.json one by one, also I've removed all the files from the repo. The behavior is the same. Only if there are totally no deps (no dev-deps also) yarn does not remove files. I left only react as a dep and yarn again removes all the files. My repo (you can update it) contains just package.json. Here's the contents of it:

{
  "devDependencies": {
      "react": "15.3.1"
  }
}

And here's what happens:

macbook@terminalx ~/work/tmp/13 $ rm -rf yarn-removes-all-recursively && rm -rf ~/.yarn && rm -rf ~/.yarn-cache && git clone https://github.com/GrigoryPtashko/yarn-removes-all-recursively.git
Cloning into 'yarn-removes-all-recursively'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 18 (delta 1), reused 18 (delta 1), pack-reused 0
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
macbook@terminalx ~/work/tmp/13 $ cd yarn-removes-all-recursively/
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively (master)$ yarn
yarn install v0.15.1
info No lockfile found.
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
error Couldn't find a package.json (or bower.json) file in /Users/macbook/Documents/work/tmp/13/yarn-removes-all-recursively
    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
    at next (native)
    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
    at run (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:87:22)
    at /usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:100:28
    at flush (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/_microtask.js:18:9)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $ l
total 8
drwxr-xr-x   4 macbook  staff   136B 15 окт 20:06 ./
drwxr-xr-x   4 macbook  staff   136B 15 окт 20:06 ../
drwxr-xr-x  19 macbook  staff   646B 15 окт 20:06 node_modules/
-rw-r--r--   1 macbook  staff   3,0K 15 окт 20:06 yarn.lock
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $ 

You see that I rm -rf all yarn cache. But still yarn removes all the files.

@wmertens
Copy link

I guess that only leaves the Node version, very weird… Next step is adding
debug code to see when the package.json is removed. I don't know the
codebase, so I can't help there.

On Sat, Oct 15, 2016 at 7:14 PM Grigory Ptashko [email protected]
wrote:

@wmertens https://github.com/wmertens @Daniel15
https://github.com/Daniel15

Non of what you proposed did not work. I've removed the deps from the
package.json one by one, also I've removed all the files from the repo.
The behavior is the same. Only if there are totally no deps (no dev-deps
also) yarn does not remove files. I left only react as a dep and yarn
again removes all the files. My repo (you can update it) contains just
package.json. Here's the contents of it:

{
"devDependencies": {
"react": "15.3.1"
}
}

And here's what happens:

macbook@terminalx ~/work/tmp/13 $ rm -rf yarn-removes-all-recursively && rm -rf ~/.yarn && rm -rf ~/.yarn-cache && git clone https://github.com/GrigoryPtashko/yarn-removes-all-recursively.git
Cloning into 'yarn-removes-all-recursively'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 18 (delta 1), reused 18 (delta 1), pack-reused 0
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
macbook@terminalx ~/work/tmp/13 $ cd yarn-removes-all-recursively/
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively (master)$ yarn
yarn install v0.15.1
info No lockfile found.
warning No license field
[1/4] 🔍 Resolving packages...
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
[4/4] 📃 Building fresh packages...
success Saved lockfile.
error Couldn't find a package.json (or bower.json) file in /Users/macbook/Documents/work/tmp/13/yarn-removes-all-recursively
at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
at next (native)
at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
at run (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:87:22)
at /usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/es6.promise.js:100:28
at flush (/usr/local/lib/node_modules/yarn/node_modules/core-js/library/modules/_microtask.js:18:9)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $ l
total 8
drwxr-xr-x 4 macbook staff 136B 15 окт 20:06 ./
drwxr-xr-x 4 macbook staff 136B 15 окт 20:06 ../
drwxr-xr-x 19 macbook staff 646B 15 окт 20:06 node_modules/
-rw-r--r-- 1 macbook staff 3,0K 15 окт 20:06 yarn.lock
macbook@terminalx ~/work/tmp/13/yarn-removes-all-recursively $

You see that I rm -rf all yarn cache. But still yarn removes all the
files.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1057 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADWlm3BUvnboNOm1jdKFFxSyvlLPpOWks5q0QnngaJpZM4KXBSq
.

@jiripospisil
Copy link

@GrigoryPtashko Have you modified your home directory (e.g. setting $HOME to a different location)? I don't have an OSX machine but the output seems strange. Your terminal shows ~/work/tmp/13/yarn-removes-all-recursively in the prompt (which should expand to /Users/macbook/work/tmp/13/yarn-removes-all-recursively) and yet yarn complains about not finding the file in /Users/macbook/Documents/work/tmp/13/yarn-removes-all-recursively (notice the Documents part).

Could you send the output of the following two commands?

echo ~macbook
echo ~

@GrigoryPtashko
Copy link
Author

@jiripospisil yes, you've noticed that I really made a symlink of ~/Documents/work to ~/work. This is what you see in the output. But nothing changes if I do the same in my $HOME directory without any intermediate directories. I've added the output of two commands as you asked:

macbook@terminalx ~ $ echo ~macbook
/Users/macbook
macbook@terminalx ~ $ echo ~
/Users/macbook
macbook@terminalx ~ $ rm -rf yarn-removes-all-recursively && rm -rf ~/.yarn && rm -rf ~/.yarn-cache && git clone https://github.com/GrigoryPtashko/yarn-removes-all-recursively.git
Cloning into 'yarn-removes-all-recursively'...
remote: Counting objects: 18, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 18 (delta 1), reused 18 (delta 1), pack-reused 0
Unpacking objects: 100% (18/18), done.
Checking connectivity... done.
macbook@terminalx ~ $ cd yarn-removes-all-recursively/
macbook@terminalx ~/yarn-removes-all-recursively (master)$ l
total 8
drwxr-xr-x    4 macbook  staff   136B 15 окт 22:56 ./
drwxr-xr-x+ 150 macbook  staff   5,0K 15 окт 22:56 ../
drwxr-xr-x   12 macbook  staff   408B 15 окт 22:56 .git/
-rw-r--r--    1 macbook  staff    55B 15 окт 22:56 package.json
macbook@terminalx ~/yarn-removes-all-recursively (master)$ yarn
yarn install v0.15.1
info No lockfile found.
warning No license field
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 📃  Building fresh packages...
success Saved lockfile.
error Couldn't find a package.json (or bower.json) file in /Users/macbook/yarn-removes-all-recursively
    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13
    at next (native)
    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)
    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20
info Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command.
macbook@terminalx ~/yarn-removes-all-recursively $ l
total 8
drwxr-xr-x    4 macbook  staff   136B 15 окт 22:57 ./
drwxr-xr-x+ 152 macbook  staff   5,0K 15 окт 22:57 ../
drwxr-xr-x   19 macbook  staff   646B 15 окт 22:57 node_modules/
-rw-r--r--    1 macbook  staff   3,0K 15 окт 22:57 yarn.lock
macbook@terminalx ~/yarn-removes-all-recursively $ 

@wmertens
Copy link

Can you run yarn --json | grep -v progressTick instead of yarn? That should report any file removing that Yarn does, as far as I can tell…

@GrigoryPtashko
Copy link
Author

GrigoryPtashko commented Oct 15, 2016

@wmertens

macbook@terminalx ~/yarn-removes-all-recursively (master)$ yarn --json | grep -v progressTick
{"type":"info","data":"No lockfile found."}
{"type":"warning","data":"No license field"}
{"type":"step","data":{"message":"Resolving packages","current":1,"total":4}}
{"type":"activityStart","data":{"id":0}}
{"type":"activityTick","data":{"id":0,"name":"[email protected]"}}
{"type":"activityTick","data":{"id":0,"name":"fbjs@^0.8.4"}}
{"type":"activityTick","data":{"id":0,"name":"loose-envify@^1.1.0"}}
{"type":"activityTick","data":{"id":0,"name":"object-assign@^4.1.0"}}
{"type":"activityTick","data":{"id":0,"name":"core-js@^1.0.0"}}
{"type":"activityTick","data":{"id":0,"name":"immutable@^3.7.6"}}
{"type":"activityTick","data":{"id":0,"name":"isomorphic-fetch@^2.1.1"}}
{"type":"activityTick","data":{"id":0,"name":"loose-envify@^1.0.0"}}
{"type":"activityTick","data":{"id":0,"name":"promise@^7.1.1"}}
{"type":"activityTick","data":{"id":0,"name":"ua-parser-js@^0.7.9"}}
{"type":"activityTick","data":{"id":0,"name":"js-tokens@^1.0.1"}}
{"type":"activityTick","data":{"id":0,"name":"node-fetch@^1.0.1"}}
{"type":"activityTick","data":{"id":0,"name":"whatwg-fetch@>=0.10.0"}}
{"type":"activityTick","data":{"id":0,"name":"asap@~2.0.3"}}
{"type":"activityTick","data":{"id":0,"name":"encoding@^0.1.11"}}
{"type":"activityTick","data":{"id":0,"name":"is-stream@^1.0.1"}}
{"type":"activityTick","data":{"id":0,"name":"iconv-lite@~0.4.13"}}
{"type":"activityEnd","data":{"id":0}}
{"type":"step","data":{"message":"Fetching packages","current":2,"total":4}}
{"type":"progressStart","data":{"id":0,"total":16}}
{"type":"progressFinish","data":{"id":0}}
{"type":"step","data":{"message":"Linking dependencies","current":3,"total":4}}
{"type":"progressStart","data":{"id":1,"total":16}}
{"type":"progressStart","data":{"id":2,"total":1451}}
{"type":"progressFinish","data":{"id":2}}
{"type":"progressStart","data":{"id":3,"total":16}}
{"type":"progressFinish","data":{"id":3}}
{"type":"step","data":{"message":"Building fresh packages","current":4,"total":4}}
{"type":"activitySetStart","data":{"id":1,"total":0,"workers":5}}
{"type":"activitySetEnd","data":{"id":1}}
{"type":"success","data":"Saved lockfile."}
{"type":"error","data":"Couldn't find a package.json (or bower.json) file in /Users/macbook/yarn-removes-all-recursively\n    at /usr/local/lib/node_modules/yarn/lib/config.js:355:13\n    at next (native)\n    at step (/usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:17:30)\n    at /usr/local/lib/node_modules/yarn/node_modules/babel-runtime/helpers/asyncToGenerator.js:28:20"}
{"type":"info","data":"Visit http://yarnpkg.com/en/docs/cli/install for documentation about this command."}
macbook@terminalx ~/yarn-removes-all-recursively $ 

@eknkc
Copy link
Contributor

eknkc commented Oct 15, 2016

Just to add one more data point;

  • Tried on Node 6.3.0, Sierra. No repro.
  • Tried within folders named tmp etc and within symlinked folders in case something wonky is happening in yarn. No luck.

I wonder, is there any custom setup on this disk? Case sensitive filesystem or something like that? I had all kinds of weird stuff going on due to filesystem case sensitivity with one of my older osx installations.

@wmertens
Copy link

Interestingly, it seems as if the file removal is not done by yarn, since,
AFAICT, that only happens through unlink.js, and that sends json messages…

On Sun, Oct 16, 2016 at 12:13 AM Ekin Koc [email protected] wrote:

Just to add one more data point;

  • Tried on Node 6.3.0, Sierra. No repro.
  • Tried within folders named tmp etc and within symlinked folders in
    case something wonky is happening in yarn. No luck.

I wonder, is there any custom setup on this disk? Case sensitive
filesystem or something like that? I had all kinds of weird stuff going on
due to filesystem case sensitivity with one of my older osx installations.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#1057 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AADWlirTDcp4r6qiyMvHIukqeoA3N7CTks5q0VAegaJpZM4KXBSq
.

@chlunde
Copy link
Contributor

chlunde commented Oct 26, 2016

Might have been fixed by #1441 - did you have a .bowerrc somewhere?

Environment variables
Local .bowerrc located in the current working directory
All .bowerrc files upwards the directory tree
.bowerrc file located in user’s home folder (~)
.bowerrc file located in the global folder (/)

@bestander
Copy link
Member

Fixed, according to last comment.
Feel free to reopen with repro steps

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

No branches or pull requests

9 participants