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 🙏

© 2024 – Pkg Stats / Ryan Hefner

yarn-fix-bin-cmds

v1.0.3

Published

Fixes the bin .cmd files for windows systems to work when executed from symlink dir (see yarn issue: #4564)

Downloads

3

Readme

yarn-fix-bin-cmds

Yarn currently has an issue (#4564) which can cause commands to fail during lifecycle scripts or in other operations when working with a workspace on Windows.

This occurs because symlinked dependency directories created for workspaces are not resolved to the realpath in the output node_modules/.bin/*.cmd files.

Consequently, in some cases, the relative paths will fail, because it tries to resolve from the symlinked directory (eg. root/node_modules/@my-scope/my-pkg/node_modules/.bin) as opposed to the real path (eg. root/workspaces/my-pkg/node_modules/.bin).

Scope

This appears to impact both Yarn 1 and Yarn 2+, however, this package was created for Yarn 1. We'd be happy to add Yarn 2+ support if a PR is submitted, or potentially a little later if you file an issue with a reproduction.

Additionally, if another version of yarn isn't working with this, please file an issue with the version.

Issue Detail

A preliminary PR has been submitted to Yarn 1, but it seems likely that it won't be addressed for some time. This package is a workaround for the issue until it is resolved.

Usage

Method 1

You can generally use this package as a in a lifecycle script (eg preinstall, postinstall, prepare, etc,) in the package.json for the workspaces which need it.

eg.

{
  "scripts": {
    "postinstall": "npx -y yarn-fix-bin-cmds"
  }
}

If you have any issues, you can also add a nohoist entry for this package in your root package.json:

eg.

{
  "workspaces": {
    "nohoist": [
      "**/yarn-fix-bin-cmds"
    ]
  }
}

Other Methods

You can also use the command-line options to specify specific .bin directories or command files to fix

To see all options, run

npx -y yarn-fix-bin-cmds --help