Rich-Harris / degit

Straightforward project scaffolding
MIT License
6.93k stars 242 forks source link

why install success , but use it error #345

Open staxing opened 2 years ago

staxing commented 2 years ago

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

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

xiefangqing commented 2 years ago

Encountered the same problem

staxing commented 2 years ago

  您好,邮件已经收到,我将尽快给您回复。谢谢~~

jiang-24-gdufs commented 1 year ago

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 1 year ago

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 commented 1 year ago

  您好,邮件已经收到,我将尽快给您回复。谢谢~~

sedationh commented 1 year ago

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

staxing commented 1 year ago

  您好,邮件已经收到,我将尽快给您回复。谢谢~~