Skip to content

Online yarn installs created an undesired package install #1684

Closed

Description

@lpalmes

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;
};

Activity

  1. tox-p commented on Feb 28, 2017

    @tox-p

    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.

  2. lpalmes commented on Feb 28, 2017

    @lpalmes
    ContributorAuthor

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

  3. added this to the 0.9.4 milestone on Feb 28, 2017
  4. lpalmes commented on Feb 28, 2017

    @lpalmes
    ContributorAuthor

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

  5. Timer commented on Feb 28, 2017

    @Timer
    Contributor

    Thanks so much! Please see comment in #1685.

  6. Timer commented on Mar 1, 2017

    @Timer
    Contributor

    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.

  7. reopened this on Mar 1, 2017
  8. changed the title [-]"false":"0.0.4" on package.json[/-] [+]Online yarn installs created an undesired package install[/+] on Mar 1, 2017
  9. lpalmes commented on Mar 1, 2017

    @lpalmes
    ContributorAuthor

    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 😄

  10. gaearon commented on Mar 5, 2017

    @gaearon
    Contributor

    @lpalmes

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

  11. gaearon commented on Mar 5, 2017

    @gaearon
    Contributor

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

  12. lpalmes commented on Mar 5, 2017

    @lpalmes
    ContributorAuthor

    @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.

  13. gaearon commented on Mar 5, 2017

    @gaearon
    Contributor

    No worries, thanks for helping!

  14. locked and limited conversation to collaborators on Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions