question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug]: in `v3.3.0` - `.bin` executables not found w/ `nodeLinker: node-modules`

See original GitHub issue

Self-service

  • I’d be willing to implement a fix

Describe the bug

Yarn doesn’t find executables from .bin w/ nodeLinker: node-modules

To reproduce

  1. Clone this repo
  2. Install deps yarn
  3. Run yarn bin tsx

Yarn doesn’t find tsx, even though tsx is at node_modules/.bin/tsx

Environment

System:
  OS: macOS 13.0
  CPU: (10) arm64 Apple M1 Pro
Binaries:
  Node: 19.0.1 - /private/var/folders/g9/z1czk9t57xngdyn1_yhbgsxr0000gn/T/xfs-d9f8aee5/node
  Yarn: 3.3.0 - /private/var/folders/g9/z1czk9t57xngdyn1_yhbgsxr0000gn/T/xfs-d9f8aee5/yarn
  npm: 8.19.2 - /opt/homebrew/bin/npm

Additional context

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
o-alexandrovcommented, Nov 22, 2022

The documentation points to a yarn-only way that would be hard to understand for anyone looking at such DX for the first time.

  • actual script (CLI cmd) would be hidden in another repo’s package.json

For this case, probably a more rational approach is:

  • to stay w/ Yarn V1, or either npm/pnpm
  • and hope for the bun’s success as a pkg manager, when deciding to upgrade from Yarn V1
0reactions
arcaniscommented, Nov 22, 2022

As for your use case, the documentation may give you some ideas: https://yarnpkg.com/getting-started/qa/#how-to-share-scripts-between-workspaces

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Bug] Some bin scripts not working in CI environment ... - GitHub
In a workspaced environment - even if using nodeLinker: node-modules - make sure to list any and all dependencies that your scripts rely...
Read more >
pnpm/pnpm - Gitter
When I use node-linker=pnp and symlink=false , react-scripts build fails with Couldn't find the package to use as resolution source thrown by pnp-webpack-plugin ......
Read more >
Migration | Yarn - Package Manager
A step-by-step and in-depth migration guide from Yarn 1 (Classic) to Yarn 2 (Berry).
Read more >
.npmrc | pnpm
The pnpm config command can be used to update and edit the contents of the user and global .npmrc files. The four relevant...
Read more >
Yarn install command error No such file or directory: 'install'
yarn install v1.3.2 warning You are using Node "6.0.0" which is not supported and may encounter bugs or unexpected behaviour.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found