You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug? Feature
What is the current behavior?
When you type yarn add global typings in fact you are installing the modules global & typings locally to your module package.json, which can be misleading when you come from the npm world where every install begins the same: npm install [...args]
In the yarn world, you can install in two ways:
yarn add [...args]
yarn global add [...args]
If the current behavior is a bug, please provide the steps to reproduce. - irrelevant -
What is the expected behavior?
I think that there should be some discussions around the install process to prevent such mixing in the developper's head. Maybe global should not be a plain word but a dashed argument just like --dev
Please mention your node.js, yarn and operating system version.
Node.js v6.5.0
Yarn v0.16.1
Linux Mint "rafaela" x86_64
The text was updated successfully, but these errors were encountered:
I don't like the proposed solution, but there is definitely a problem here. I've installed this package by accident too many times. I don't think a note in the docs is going to help much. I know the order, but I still get it wrong.
How about this: whenever the user runs yarn add global <SOMETHING ELSE>, that is:
when they try to add more than one package at once
as regular, local dependencies (not --dev etc)
and the first one in their list is named "global"
...you can infer that the user almost certainly intdned to do yarn global add foo... instead. So in this particular case, yarn could exit (with code 1) and a message something like this:
Did you mean "yarn global add ..." ?
If you really want to install the package named "global" locally,
please install it *individually* with "yarn add global".
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
When you type
yarn add global typings
in fact you are installing the modulesglobal
&typings
locally to your modulepackage.json
, which can be misleading when you come from thenpm
world where every install begins the same:npm install [...args]
In the
yarn
world, you can install in two ways:yarn add [...args]
yarn global add [...args]
If the current behavior is a bug, please provide the steps to reproduce.
- irrelevant -
What is the expected behavior?
I think that there should be some discussions around the
install
process to prevent such mixing in the developper's head. Maybeglobal
should not be a plain word but a dashed argument just like--dev
Please mention your node.js, yarn and operating system version.
v6.5.0
v0.16.1
"rafaela" x86_64
The text was updated successfully, but these errors were encountered: