Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
This repository was archived by the owner on Sep 21, 2022. It is now read-only.

No need for install -g #941

Open
Open

Description

@Pomax

Due to how npm works, you don't need to install gemini and selenium with -g, you can keep everything local to your project.

Just install with --save-dev, and then gemini etc. can be called in npm scripts without any additional work. If you also need to run them in other scripts like make or the like (not recommended of course, npm scripts are cross-platform, make etc. are not) there is the npx command, which is the only npm dependency (possibly alongside nvm) that you should need to install globally.

Activity

  1. sipayRT commented on Dec 5, 2018

    @sipayRT
    Member

    but you don't need to install your selenium-standalone in each project - this is a common util for test running. yes, you can install gemini locally, but not selenium-standalone - is't uncomfortably in development

  2. Pomax commented on Dec 5, 2018

    @Pomax
    Author

    Maybe, but there are also folks like me, who have about 100+ git projects cloned and installed, and literally none of them use selenium. Even though it's "a widely used tool", it's not a "universally used tool": you're going to find loads of folks who've never used it, and have no desire to install something globally that's only used for one or even a few projects =)

    Also, because of how npm works, local dependency tracking is preferable to global dependency tracking: global dependencies cannot be version pegged, which means package-lock.json is still going to force that dependency into the local tree instead, to prevent version conflicts for projects that rely on a specific version of selenium in order not to run into "oh the new version just "pulled an event-stream" and has a bitcoin mining patch in it".

    Unless it's npm itself, or tools to use npm managed packages, the modern approach is to have it all local using --save-dev, and have npm manage the filetree. It's really good at that by now.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions