Pnpm: pnpx not working

Created on 28 Nov 2017  ·  5Comments  ·  Source: pnpm/pnpm

pnpx pg-schema-diff
Resolving: total 201, reused 176, downloaded 25, done
Adding 201 packages to node_modules
// npx: command not found: pg-schema-diff

npmx pg-schema-diff
npx: installed 202 in 12.896s
Usage: ../../.npm/_npx/5445/bin/dbdiff conn_string1 schema1 conn_string2 schema2

[email protected]


Looks like pnpx not handling a bin named something different: dbdiff

bug

Most helpful comment

Im using wsl (Ubuntu) on Win10. Oddly pnpx finds and installs the package before telling me command not found.

❯nx npm-name-cli
Packages: +175
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Resolving: total 175, reused 0, downloaded 175, done

/home/tyrsius/.npm/_npx/25958/pnpm-global/2:
+ npm-name-cli 2.6.0

npx: command not found: npm-name-cli

❯npx npm-name-cli
npx: installed 175 in 10.455s
Specify one or more package names

All 5 comments

Just ran into this again.

pnpx protobufjs
npx: command not found: protobufjs

npx protobufjs
usage: pbjs [options] file1.proto file2.json ...  (or pipe)  other | pbjs [options] -

Same with me 😞. Running in git-bash, Win10. In linux works fine.

Same issue, Win10 Home, likely git-bash inside VSCode.
pnpm & npx both work great.

Im using wsl (Ubuntu) on Win10. Oddly pnpx finds and installs the package before telling me command not found.

❯nx npm-name-cli
Packages: +175
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Resolving: total 175, reused 0, downloaded 175, done

/home/tyrsius/.npm/_npx/25958/pnpm-global/2:
+ npm-name-cli 2.6.0

npx: command not found: npm-name-cli

❯npx npm-name-cli
npx: installed 175 in 10.455s
Specify one or more package names

Came by to report a bug with installing packages on the fly from URLs, but it looks like it may actually be a naming collision. For packages installed from URLs pnpx tries to run the last path segment as the bin, which obviously will not match for things like gists:

npx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32
# npx: installed 1 in 21.536s
# yay gist
pnpx https://gist.github.com/zkat/4bc19503fe9e9309e2bfaa2c58074d32
# Packages: +1
# +
# Resolving: total 1, reused 0, downloaded 1, done
#  WARN  undefined has no binaries
# 
# /Users/zegnat/.npm/_npx/29529/pnpm-global/3:
# + npx-is-cool 0.0.0
# npx: command not found: 4bc19503fe9e9309e2bfaa2c58074d32
Was this page helpful?
0 / 5 - 0 ratings

Related issues

vjpr picture vjpr  ·  3Comments

MichalLytek picture MichalLytek  ·  5Comments

radarsu picture radarsu  ·  3Comments

zkochan picture zkochan  ·  3Comments

jsumners picture jsumners  ·  3Comments