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

Online yarn installs created an undesired package install #1684

Closed
lpalmes opened this issue Feb 28, 2017 · 10 comments
Closed

Online yarn installs created an undesired package install #1684

lpalmes opened this issue Feb 28, 2017 · 10 comments
Milestone

Comments

@lpalmes
Copy link
Contributor

lpalmes commented Feb 28, 2017

I just installed create-react-app with yarn global add create-react-app and created a project.
When i was looking through the dependencies i found out this

{
  "name": "blue",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "false": "0.0.4",
    "react": "^15.4.2",
    "react-dom": "^15.4.2"
  },
  "devDependencies": {
    "react-scripts": "0.9.3"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  }
}

And i was not sure what was "false":"0.0.4", while looking at the module i found out that false was just like another leftpad. I find it hard to reason why has been included in cra. If it was intended to be included sorry, i just found odd.

// false module source code :/
module.exports = function () {
  return false;
};
@tox-p
Copy link

tox-p commented Feb 28, 2017

Same issue here, already did some digging.

The false package is there because this line evaluates to false when installing with yarn while online. If you install offline (or with npm) the dependency on the false package is not included.

@lpalmes
Copy link
Contributor Author

lpalmes commented Feb 28, 2017

@tox-p you are right, it's using the false value as the name package

@lpalmes
Copy link
Contributor Author

lpalmes commented Feb 28, 2017

@Timer just added #1685 to pull requests which fixies this issue.

@Timer
Copy link
Contributor

Timer commented Feb 28, 2017

Thanks so much! Please see comment in #1685.

@Timer Timer closed this as completed Feb 28, 2017
@Timer
Copy link
Contributor

Timer commented Mar 1, 2017

I'm going to reopen this because I want to remember to add you to a changelog [somewhere]. 😄 Our fixes were virtually identical, and you deserve some recognition for acting so fast.

@Timer Timer reopened this Mar 1, 2017
@Timer Timer changed the title "false":"0.0.4" on package.json Online yarn installs created an undesired package install Mar 1, 2017
@lpalmes
Copy link
Contributor Author

lpalmes commented Mar 1, 2017

Thanks @Timer, It is not necessary but i really appreciate it. I've been using cra for a long time, so i was happy to give something back 😄

@gaearon
Copy link
Contributor

gaearon commented Mar 5, 2017

@lpalmes

Would you be interested in adding a test for this to the end-to-end script, as mentioned in #1685 (comment)?

@gaearon
Copy link
Contributor

gaearon commented Mar 5, 2017

I’m going to close this one, but happy to accept @lpalmes’s contributions for #1720.

@gaearon gaearon closed this as completed Mar 5, 2017
@lpalmes
Copy link
Contributor Author

lpalmes commented Mar 5, 2017

@gaearon i've been looking at it and now that i got more time (had to deliver a mobile app) i will try to come up with a solution, i'm looking into awk to add testing in the script, thank you, and sorry for taking such a long time.

@gaearon
Copy link
Contributor

gaearon commented Mar 5, 2017

No worries, thanks for helping!

@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants