npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

resolve-local-dependencies

v1.0.2

Published

CLI tool that helps install local dependencies by resolving symlinks into real copies.

Readme

resolve-local-dependencies

A simple CLI tool to help install local dependencies from the filesystem. It is particularly useful for monorepos or development workflows where some project setups cannot resolve symlinked local dependencies.

When you use npm install with a local path (e.g., file:../my-package), npm creates a symbolic link in node_modules. This can cause module resolution errors in certain environments. This tool addresses the issue by replacing these symlinks with a physical copy of the dependency's directory, making it behave like a regular npm package.

It is designed to be run in a postinstall script to automate the process. The package also provides an export so this functionality can be imported and used programmatically.

Features

  • Helps installing dependencies directly from local paths
  • Minimal dependencies (zero runtime deps)
  • Includes CLI usage

Installation

npm i resolve-local-dependencies

Usage

As a postinstall script

To automatically install local dependencies after every npm install, add the following to your package.json:

"scripts": {
    "postinstall": "resolve-local-dependencies"
}

Now, when you run npm install, the script will automatically execute, replacing any symlinked local dependencies with a physical copy.

npm install

CLI

Run directly from the command line:

npx resolve-local-dependencies

Flags

Default behavior: replace each symlinked local dependency with a physical copy, then run a production-only install (prunes devDependencies) inside each copied dependency.

Examples:

Default

resolve-local-dependencies
  • Copy over each linked local dependency
  • Run npm install --production (or equivalent) inside each copied dependency

Install with devDependencies (--dev)

resolve-local-dependencies --dev
  • Copy dependencies
  • Run full npm install including devDependencies in each copied dependency

Skip installation (--no-install)

resolve-local-dependencies --no-install
  • Only replace symlinks with directory copies
  • Skip any install step inside the copied dependencies

Suppress output (--silent)

resolve-local-dependencies --silent
  • Suppress normal console output

Show help (-h, --help)

resolve-local-dependencies -h
resolve-local-dependencies --help
  • Show help / list of flags and exit

Flags summary:

  • --dev: install all dependencies (not just production)
  • --no-install: skip running install in copied dependencies
  • --silent: suppress standard logs
  • -h, --help: display help and exit

You can combine flags where meaningful, e.g.:

resolve-local-dependencies --dev --silent

Development

This package uses:

  • Node.js Test Runner for testing
  • c8 for code coverage
  • ESLint for linting

Project Structure

/bin/cli.js        # CLI entry point
/lib/index.js      # Main logic
/tests/index.js    # Tests
/utils             # Internal helpers

Scripts

  • Run tests
npm test
  • Run tests with coverage
npm run test:cov
  • Lint the code
npm run lint

License

MIT License