Failed to install redis-commander in debian strech - npm

I tried to install redis-commander but when i run redis-commander i am getting the following errors
redis-commander
{ Error: ENOENT : no such file or directory, open '/root/.redis-commander'
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/root/.redis-commander' }
No config found or was invalid.
Using default configuration.
No Save: true
listening on 0.0.0.0 : 8081
events.js:137
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE 0.0.0.0:8081
at Object._errnoException (util.js:1003:13)
at _exceptionWithHostPort (util.js:1024:20)
at Server.setupListenHandle [as _listen2] (net.js:1366:14)
at listenInCluster (net.js:1407:12)
at doListen (net.js:1522:7)
at process._tickCallback (internal/process/next_tick.js:152:19)
root#debian:/home/midhun#

Means address (port) already in use by some other process

Related

Raspberry pi cant listen to port 80 (express.js)

so I am using raspberry pi as web server and if I want to start express app there's an error:
events.js:291
throw er; // Unhandled 'error' event
^
Error: listen EACCES: permission denied 0.0.0.0:80
at Server.setupListenHandle [as _listen2] (net.js:1293:21)
at listenInCluster (net.js:1358:12)
at Server.listen (net.js:1444:7)
at Function.listen (/home/malinapi/Documents/node_modules/express/lib/application.js:635:24)
at Object.<anonymous> (/home/malinapi/Documents/app.js:9:5)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1337:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
code: 'EACCES',
errno: 'EACCES',
syscall: 'listen',
address: '0.0.0.0',
port: 80
}
Raspberry pi: 4, model b
Any server listening on ports 1024 and below must initially be opened as root and not as an ordinary user. I'm guessing it is running as the user malinapi.
It is either that or you already have something running on port 80

I using Pdf-node-creator for generating pdf in my node application, It was working fine in local environment , But in production I get the below Error

I dono why I am getting this error please help
Error message
[Error: ENOENT: no such file or directory, open 'C:\tmp\html-pdf-6364.pdf'] {
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'C:\tmp\html-pdf-6364.pdf'
}

Vue error when creating a project from Vue CLI

After I create a Vue3 project with the Vue cli tool, my terminal crashes and gives the following error:
🚀 Starting GUI...
🌠 Ready on http://localhost:8000
node:events:368
throw er; // Unhandled 'error' event
^
Error: ENOENT: no such file or directory, scandir '/Users/xxxx/Desktop/personal/vuetest/node_modules/#vue/cli-service/locales'
at Object.readdirSync (node:fs:1390:3)
at exports.readdir (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/sync/fs.js:18:20)
at Object.safeCall [as safe] (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/call.js:24:8)
at DirectoryReader.readNextDirectory (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/directory-reader.js:78:10)
at Readable.DirectoryReader.stream._read (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/directory-reader.js:57:18)
at Readable.read (node:internal/streams/readable:496:27)
at readdirSync (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/sync/index.js:27:21)
at Function.readdirSyncStat (/usr/local/lib/node_modules/#vue/cli/node_modules/#mrmlnc/readdir-enhanced/lib/index.js:34:10)
at ReaderSync.dynamicApi (/usr/local/lib/node_modules/#vue/cli/node_modules/fast-glob/out/providers/reader-sync.js:64:24)
at ReaderSync.api (/usr/local/lib/node_modules/#vue/cli/node_modules/fast-glob/out/providers/reader-sync.js:56:25)
Emitted 'error' event on Readable instance at:
at emitErrorNT (node:internal/streams/destroy:164:8)
at emitErrorCloseNT (node:internal/streams/destroy:129:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -2,
syscall: 'scandir',
code: 'ENOENT',
path: '/Users/xxxx/Desktop/personal/vuetest/node_modules/#vue/cli-service/locales'
}
Node.js v17.0.1
I cannot start the cli again until I delete the project folder. What is the problem here ?

Running "vue ui" on Windows Subsystem For Linux (WSL) will not work

An error will get generated when running:
vue ui
vue ui
🚀 Starting GUI...
🌠 Ready on http://localhost:8001
events.js:287
throw er; // Unhandled 'error' event
^
Error: spawn cmd.exe ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:273:12)
at onErrorNT (internal/child_process.js:469:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: 'ENOENT',
code: 'ENOENT',
syscall: 'spawn cmd.exe',
path: 'cmd.exe',
spawnargs: [ '/c', 'start', '""', '/b', 'http://localhost:8001' ]
}
Expected to get an app running on port localhost:8001, but the above error gets generated.
The reason is because it is trying to open a browser window from inside WSL terminal.
Instead, do the following:
vue ui --headless
This will avoid running the cmd.exe to open a browser and instead run the app on port 8001. You'll have to open a browser manually to http://localhost:8001

Error: getaddrinfo EAI_AGAIN undefined (ldapjs)

So, i tried to deploy my Express.Js app to my vps, but I get some error that refined to Error: getaddrinfo EAI_AGAIN undefined. The weird part is, it is doing just fine if I run this app on my localhost. Any body knows how to resolve this issue?
Here are the error log that I get.
events.js:187
throw er; // Unhandled 'error' event
^
Error: getaddrinfo EAI_AGAIN undefined
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:60:26)
Emitted 'error' event on Client instance at:
at Backoff.<anonymous> (/home/user/deploy-folder/app-api/node_modules/ldapjs/lib/client/client.js:1228:12)
at Backoff.emit (events.js:210:5)
at Backoff.backoff (/home/user/deploy-folder/app-api/node_modules/ldapjs/node_modules/backoff/lib/backoff.js:41:14)
at /home/user/deploy-folder/app-api/node_modules/ldapjs/lib/client/client.js:1214:15
at f (/home/user/deploy-folder/app-api/node_modules/ldapjs/node_modules/once/once.js:25:25)
at Socket.onResult (/home/user/deploy-folder/app-api/node_modules/ldapjs/lib/client/client.js:1016:7)
at Object.onceWrapper (events.js:300:26)
at Socket.emit (events.js:210:5)
at emitErrorNT (internal/streams/destroy.js:92:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) {
errno: 'EAI_AGAIN',
code: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'undefined'
I assume that by now you discovered the error, but in this particular case it seems that the variable you are using to setup ldap is not stated or resolves to undefined.
The proper way to do it according to the documentation is this:
var ldap = require('ldapjs');
var client = ldap.createClient({
url: 'ldap://127.0.0.1:1389'
});