Rich-Harris/degit

why install success , but use it error

staxing opened this issue · 7 comments

why install success , but use it error

F:>npm install -g degit --registry=https://registry.npm.taobao.org
F:\Files\node_global\degit -> F:\Files\node_global\node_modules\degit\degit

  • degit@2.8.4
    updated 1 package in 0.633s
    -- success tips

F:>degit --help
'degit' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

Encountered the same problem

Use pnpm, encountered the same problem;
Node's version: 16.13.1
pnpm's version: 6.32.3

PS C:\Users\190680\jh_c\base> degit
node:fs:1390
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, scandir 'C:\Users\190680.degit'

In WINDOWS, when manually created .degit folder, command is work.

ntnyq commented

Use pnpm, encountered the same problem; Node's version: 16.13.1 pnpm's version: 6.32.3

PS C:\Users\190680\jh_c\base> degit
node:fs:1390
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, scandir 'C:\Users\190680.degit'

In WINDOWS, when manually created .degit folder, command is work.

Same issue here when using pnpm in macOS

The command works after creating ~/.degit directory manually.

Besides, UnhandledPromiseRejection throws if use Ctrl + C to stop the command.

The main function in cli.js need to catch the error.

@staxing This is obviously a problem with environment variables, and you may have problems installing other packages as well