Git Product home page Git Product logo

force-dedupe-git-modules's Introduction

force-dedupe-git-modules

Usage

$ force-dedupe-git-modules

The command forcibly dedupes the modules in node_modules that were obtain from git (i.e. the value-part of the dependency section in package.json is "git", "git+http", "git+https" or "git+ssh"), by moving all the git-based modules in dependency chain to right below the "./node_modules" directory, preserving the newest version among all of the installed ones.

force-dedupe-git-modules's People

Contributors

golbin avatar jin-jay avatar kazuho avatar panuhorsmalahti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

force-dedupe-git-modules's Issues

npm ERR! cb() never called

Sometimes force-dedupe-git-modules hangs when used with npm's postinstall and prints errors like these:
preserving git-based module: my_module at .
npm ERR! cb() never called!
npm ERR! not ok code 0

This is usually solved by running npm install multiple times.

Support 2.1.18

There are problems with latest npm releases, namely version 2.1.18. It appears that npm has changed the format of the _from field of installed package.json files. Sometimes npm installs a package from the npm cache and adds something like "c:\temp\npm\cache" (the path is just from memory) to the _from field. In these cases the _resolved field has something like "git://foobar".

Incompatible with winston transports

If a git reference of a winston transport (e.g. winston-couchdb) is used, the application stops working properly, since winston-couchdb is moved to the root, while the winston module might be located elsewhere in the node_modules tree. winston-couchdb tries to require winston, but it's not found, since it's not a dependency of winston-couchdb (it's a devDependency).

Making winston a dependency of winston-couchdb would fix the exception, but doesn't fix the issue, as winston transports seem to make a singleton assumption.

This might be a winston problem more than a force-dedupe-git-modules problem, though.

EDIT: Also the cradle module is a problem. The tree structure is something like this:
root\node_modules\sub\node_modules\cradle
root\node_modules\sub\node_modules\winston
root\node_modules\sub\node_modules\winston-couchdb

.. and after force-dedupe-git-modules
root\node_modules\sub\node_modules\cradle
root\node_modules\sub\node_modules\winston
root\node_modules\winston-couchdb

Since winston-couchdb requires cradle, an exception is thrown. cradle is not installed to winston-couchdb in the first place, as it can be found from the parent directory.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.