Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm exec could not determine executable to run #2003

Open
rotu opened this issue Jun 6, 2024 · 0 comments
Open

npm exec could not determine executable to run #2003

rotu opened this issue Jun 6, 2024 · 0 comments

Comments

@rotu
Copy link

rotu commented Jun 6, 2024

protobuf.js version: 7.3.0
npm version 10.8.1

When attempting to run via npm exec, I'm getting an error message:

> npx protobufjs
npm error could not determine executable to run
npm error A complete log of this run can be found in: C:\Users\dan\AppData\Local\npm-cache\_logs\2024-06-06T17_02_43_836Z-debug-0.log
> npx protobufjs-cli
npm error could not determine executable to run
npm error A complete log of this run can be found in: C:\Users\dan\AppData\Local\npm-cache\_logs\2024-06-06T17_02_46_306Z-debug-0.log

The mentioned error logs are attached.
I expect one the second one (or preferably both) to launch the pbjs command line program.

Both commands fail to find the "primary" binary of the package defined by getBinFromManifest.

  • In protobufjs, this is because there is no 'bin' entrypoint.
  • In protobufjs-cli, this is because there are two bin entries (pbjs, pbts) and neither matches the package name.

To use the cli with npx today, one clumsy workaround is:

> npm exec --package=protobufjs-cli pbjs

2024-06-06T17_02_43_836Z-debug-0.log
2024-06-06T17_02_46_306Z-debug-0.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant