Reputation: 85
I'm using Deepin v20.8, a Debian-based distribution. I try to install degit
an npm package.
node.js
. It is in /usr/bin/node
and npm
is in /usr/bin/npm
sudo npm install -g degit
, it is installed in /usr/bin/degit
degit
, it raises the following error:node:fs:1452
handleErrorFromBinding(ctx);
^
Error: ENOENT: no such file or directory, scandir '~/.degit'
at Object.readdirSync (node:fs:1452:3)
at walk (/usr/lib/node_modules/degit/dist/bin.js:525:40)
at sync (/usr/lib/node_modules/degit/dist/bin.js:591:3)
at main (/usr/lib/node_modules/degit/dist/bin.js:5607:3)
at Object.<anonymous> (/usr/lib/node_modules/degit/dist/bin.js:5712:1)
at Module._compile (node:internal/modules/cjs/loader:1254:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at Module.require (node:internal/modules/cjs/loader:1141:19) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '~/.degit'
}
Node.js v18.16.0
(I alias my user directory by ~
)
It seems I've followed every instructions in the doc, I just don't understand the problem. Do I use the wrong user account to install it? I don't know which step cause the problem, the way I install npm
or degit
? How can I fix the problem? Thanks!
Upvotes: 0
Views: 429
Reputation: 85
Seems funny, the way I solve it is to create a directory ~/.degit
. I have no idea why this won't be automatically done by the installation.
Upvotes: 0