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 --prefix ./path install ./path" installs binary files under ./path rather than ./path/node_modules/.bin #270

Open
zzwx opened this issue Mar 27, 2021 · 2 comments
Labels

Comments

@zzwx
Copy link

zzwx commented Mar 27, 2021

Versions of relevant software used
0.14.0

What happened
I'm trying to automate stuff from another directory.

What you expected to happen
protoc-gen-ts
protoc-gen-ts.cmd
protoc-gen-ts.ps1

should appear under node_modules/.bin instead of project directory.

How to reproduce it (as minimally and precisely as possible):

npm --prefix ./path install ./path without node_modules

Also repeated attempts to do the same lead to

npm ERR! code EEXIST
npm ERR! path "PATH"\node_modules\ts-protoc-gen\bin\protoc-gen-ts
npm ERR! dest "PATH"\protoc-gen-ts.cmd
npm ERR! EEXIST: file already exists, cmd shim '"PATH"\node_modules\ts-protoc-gen\bin\protoc-gen-ts' -> "PATH_TWO_LEVELS_UP"
\grpc\grpcwebclient\protoc-gen-ts.cmd'
npm ERR! File exists: PATH\protoc-gen-ts.cmd
npm ERR! Remove the existing file and try again, or run npm
npm ERR! with --force to overwrite files recklessly.

(Where PATH and PATH_TWO_LEVELS_UP are project-dependent with PATH_TWO_LEVELS_UP being 2 levels up from PATH)

Environment:

  • OS: Windows 10
@zzwx
Copy link
Author

zzwx commented Mar 29, 2021

yarn --cwd ./path works as intended. So it might be an npm bug.

@stale
Copy link

stale bot commented Apr 17, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Apr 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant