jaredpalmer / tsdx

Zero-config CLI for TypeScript package development
https://tsdx.io
MIT License
11.22k stars 507 forks source link

npx fails with "cb.apply is not a function" error #955

Closed mssngr closed 3 years ago

mssngr commented 3 years ago

Current Behavior

 ~ npx tsdx create test
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/p2813835/.npm/_logs/2021-01-14T22_09_17_505Z-debug.log
Install for [ 'tsdx@latest' ] failed with code 1

Expected behavior

It to actually create the test library.

Suggested solution(s)

Unsure what the actual problem is.

Additional context

I cleared my npm cache, but I realize, now, that npx doesn't even use my system's npm. It has it's own npm in a bin folder it uses.

Your environment

 ~ npx envinfo --system OS --browsers --binaries --npmPackages tsdx,typescript --npmGlobalPackages tsdx,typescript
npm ERR! cb.apply is not a function

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/p2813835/.npm/_logs/2021-01-14T22_19_52_679Z-debug.log
Install for [ 'envinfo@latest' ] failed with code 1

Well, that was unhelpful. Maybe this is an issue with npx, itself? I have also tried reinstalling npx, but I get the same results.

 ~ npx --version
10.2.2                                                                                                                                                                       /0.2s
 ~ node --version
v14.15.4                                                                                                                                                                     /0.1s
 ~
mssngr commented 3 years ago

Referencing an issue I opened with npx: https://github.com/npm/npx/issues/94

Seems this is an issue solely with npx.