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 global add GitHubUser/repo does much more #7019

Open
DanielRuf opened this Issue Feb 9, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@DanielRuf
Copy link
Contributor

DanielRuf commented Feb 9, 2019

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

Bug

What is the current behavior?
When I do yarn global add DanielRuf/phantomjs-mocked then Yarn shows me some number of packages which are loaded and installed / resolved by Yarn but not part of the package (which has 0 dependencies).

Why does Yarn (on Windows) do that?

A local install is much faster and does not so much.

yarn add v1.13.0
verbose 0.375 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\yarn-test\\.npmrc".
verbose 0.376 Checking for configuration file "C:\\Users\\Daniel\\.npmrc".
verbose 0.376 Found configuration file "C:\\Users\\Daniel\\.npmrc".
verbose 0.382 Checking for configuration file "C:\\Users\\Daniel\\scoop\\apps\\nvm\\current\\nodejs\\nodejs\\etc\\npmrc".
verbose 0.382 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\yarn-test\\.npmrc".
verbose 0.382 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\.npmrc".
verbose 0.382 Checking for configuration file "C:\\Users\\Daniel\\.npmrc".
verbose 0.383 Found configuration file "C:\\Users\\Daniel\\.npmrc".
verbose 0.383 Checking for configuration file "C:\\Users\\.npmrc".
verbose 0.386 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\yarn-test\\.yarnrc".
verbose 0.386 Checking for configuration file "C:\\Users\\Daniel\\.yarnrc".
verbose 0.387 Found configuration file "C:\\Users\\Daniel\\.yarnrc".
verbose 0.387 Checking for configuration file "C:\\Users\\Daniel\\scoop\\apps\\nvm\\current\\nodejs\\nodejs\\etc\\yarnrc".
verbose 0.387 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\yarn-test\\.yarnrc".
verbose 0.388 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\.yarnrc".
verbose 0.388 Checking for configuration file "C:\\Users\\Daniel\\.yarnrc".
verbose 0.388 Found configuration file "C:\\Users\\Daniel\\.yarnrc".
verbose 0.388 Checking for configuration file "C:\\Users\\.yarnrc".
verbose 0.394 current time: 2019-02-09T22:55:38.919Z
[1/4] Resolving packages...
verbose 0.454 Performing "HEAD" request to "https://github.com/DanielRuf/phantomjs-mocked".
verbose 1.25 Request "https://github.com/DanielRuf/phantomjs-mocked" finished with status code 200.
verbose 1.253 Performing "GET" request to "https://github.com/DanielRuf/phantomjs-mocked.git/info/refs?service=git-upload-pack".
verbose 2.014 Request "https://github.com/DanielRuf/phantomjs-mocked.git/info/refs?service=git-upload-pack" finished with status code 200.
verbose 3.218 Performing "GET" request to "https://raw.githubusercontent.com/DanielRuf/phantomjs-mocked/5e0b6e7849166184a666898f8c7e781c9b5dc8a1/package.json".
verbose 5.042 Request "https://raw.githubusercontent.com/DanielRuf/phantomjs-mocked/5e0b6e7849166184a666898f8c7e781c9b5dc8a1/package.json" finished with status code 200.
[2/4] Fetching packages...
[3/4] Linking dependencies...
verbose 5.099 Creating directory "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked".
verbose 5.102 Creating directory "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked\\bin".
verbose 5.103 Copying "C:\\Users\\Daniel\\scoop\\apps\\yarn\\current\\cache\\v4\\npm-phantomjs-mocked-1.0.0-5e0b6e7849166184a666898f8c7e781c9b5dc8a1\\node_modules\\phantomjs-mocked\\index.js" to "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked\\index.js".
verbose 5.105 Copying "C:\\Users\\Daniel\\scoop\\apps\\yarn\\current\\cache\\v4\\npm-phantomjs-mocked-1.0.0-5e0b6e7849166184a666898f8c7e781c9b5dc8a1\\node_modules\\phantomjs-mocked\\package.json" to "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked\\package.json".
verbose 5.108 Copying "C:\\Users\\Daniel\\scoop\\apps\\yarn\\current\\cache\\v4\\npm-phantomjs-mocked-1.0.0-5e0b6e7849166184a666898f8c7e781c9b5dc8a1\\node_modules\\phantomjs-mocked\\version.json" to "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked\\version.json".
verbose 5.108 Copying "C:\\Users\\Daniel\\scoop\\apps\\yarn\\current\\cache\\v4\\npm-phantomjs-mocked-1.0.0-5e0b6e7849166184a666898f8c7e781c9b5dc8a1\\node_modules\\phantomjs-mocked\\bin\\phantomjs-mocked.js" to "C:\\Users\\Daniel\\GITHUB\\yarn-test\\node_modules\\phantomjs-mocked\\bin\\phantomjs-mocked.js".
[4/4] Building fresh packages...
success Saved 1 new dependency.
info Direct dependencies
└─ phantomjs-mocked@1.0.0
info All dependencies
└─ phantomjs-mocked@1.0.0
Done in 4.81s.

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

What is the expected behavior?
Yarn should only install my package without loading any other packages.

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

$ node --version && yarn --version
v8.11.0
1.13.0

Logfile

@heupr heupr bot assigned imsnif Feb 9, 2019

@heupr heupr bot added the triaged label Feb 9, 2019

@DanielRuf

This comment has been minimized.

Copy link
Contributor Author

DanielRuf commented Feb 9, 2019

Also seems these and others are done multiple times even during a local install:

verbose 0.375 Checking for configuration file "C:\\Users\\Daniel\\GITHUB\\yarn-test\\.npmrc".
verbose 0.376 Checking for configuration file "C:\\Users\\Daniel\\.npmrc".
verbose 0.376 Found configuration file "C:\\Users\\Daniel\\.npmrc".
@KevinGrandon

This comment has been minimized.

Copy link

KevinGrandon commented Feb 13, 2019

This is expected because you can have a .npmrc configuration file in any parent directory. It looks like you're only seeing this output because verbose mode is turned on. Did you explicitly enable that?

@DanielRuf

This comment has been minimized.

Copy link
Contributor Author

DanielRuf commented Feb 14, 2019

Did you explicitly enable that?

Yes I did to see why Yarn was taking mucb longer when I install a global package.

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