Socket
Socket
Sign inDemoInstall

link

Package Overview
Dependencies
0
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    link

A better npm link


Version published
Weekly downloads
5.3K
decreased by-13.76%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

A safer version of npm link.

Usage

npx link simply symlinks the target package as a dependency in the current project.

Unlike npm link, it doesn't install the target package globally or re-install project dependencies.

From the project you want to link a package to:

npx link <package-path>

FAQ

Because npm link has foot guns that make it dangerous to use.

You must use npx v7 or higher. Check the version with npx -v.

In the obsolete npx v6, local binaries take precedence over npm modules so npx link can point to the native link/ln command:

$ npx link
usage: ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file [target_file]
       ln [-s [-F] | -L | -P] [-f | -i] [-hnv] source_file ... target_dir
       link source_file target_file

To work around this, install link globally first:

$ npm i -g link
$ npx link
  • npx ci - A better npm ci.

Keywords

FAQs

Last updated on 21 Apr 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc