Questions tagged [node.js]
Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine.
262 questions
1
vote
4
answers
5k
views
How to pipe fd 3 to consumer instead of fd1 / fd2
I was hoping to do something like this:
echo 'foo' >&3 3| cat
Basically, I want to write 'foo' to 3, and then only pipe the data in 3 to cat. But the above doesn't work, I get:
bash: 3: Bad ...
-1
votes
1
answer
437
views
producer connect to consumer with unix domain sockets
I have this:
producer-client | consumer-server
the consumer starts a tcp server listening on a unix domain socket (something like that), and the client (the producer) will connect to it.
However, ...
1
vote
1
answer
10k
views
EACCES: permission denied when using sudo
I'm trying to install a node package using NPM, but it just gives a permission error. I could install packages without any issues yesterday, but for some reason it has stopped working.
asgeir@...
0
votes
0
answers
184
views
Process substitution doesn't work with diff and node
I'm trying to compare the output of my fizzbuzz.js program:
for (let i = 1; i <= 100; i++) {
let out = "";
if (i % 3 == 0) out += "Fizz";
if (i % 5 == 0) out += "Buzz";
if (i % 3 &&...
1
vote
0
answers
2k
views
how to set env variable for yarn installed package?
I installed babel-cli package via yarn globally
yarn add babel-cli global
I need to set env variable.documentation says bin folder should be here
~/.config/yarn/global.
inside there are 4 js files. ...
0
votes
1
answer
53
views
Using different node versions on centos 6
I'm attempting to run different node js versions on my centos 6.
When I run node -v
I get v10.16.0
I then run n
And I can select
node/8.16.0
ο node/10.16.0
node/11.0.0
I select node/8/16....
1
vote
1
answer
4k
views
/usr/bin/node no such file or directory
I currently broke my node setup by attempting to upgrade it following a tutorial. I added a symlink and I was told to just reinstall node on here since the symlink can't be undone.
I went ahead ...
0
votes
2
answers
1k
views
Node.js and PHP on port 80 on same server
I have a node.js site running on port 8080 of my Linux server. I also have, on the same sarver, a PHP site (bugzilla) running on port 80. So my current configuration is:
http://example.com:8080 (node....
0
votes
0
answers
2k
views
Node processes keep restarting
I'm currently running a few node processes on PM2, but when I stop them with pm2, then run ps -ef | grep node, it shows the processes as still running.
One of them is an express application that ...
1
vote
1
answer
397
views
Can I install Node.js on Endless OS efficiently?
Endless OS is a linux-debian distribution that runs on the Endless Mini computer.
I found out about Endless form this itsfoss
See this wikipedia.
I'm trying to find a small PC that runs a nix OS ...
1
vote
1
answer
276
views
Tmux crashing tty_clamp_area
using tmux as my dev environment. I have a standard split with vim on top, a three panes bellow that, one running npm start, one running the nodejs backend and the other one for stuff like git status. ...
0
votes
1
answer
8k
views
yum install npm fails with failure: repodata/repomd.xml from pgdg10
I am trying to install the npm through yum install npm command but it fails every time with the below log:
epel/x86_64/metalink | 6.0 kB 00:00
google-...
2
votes
1
answer
2k
views
How does one set up CodiMD as a personal wiki?
CodiMD is great for collaborative work, but I would like to use it for personal notes on my laptop (Ubuntu 18.04), configured so that it works without an internet connection and uses as few resources ...
1
vote
1
answer
170
views
zip excludes certain js files for no apparent reason
Trying to build a zip package for AWS Lambda that runs a node app. I'm using OSX zip to package the lambda bundle like this:
zip -dg -q -FS -R function.zip index.js "*.json" node_modules
However, ...
5
votes
1
answer
2k
views
How can my cpu frequency be above maximum MHz value in lscpu?
How can it be, that my current cpu frequency (CPU MHz) for my Intel Core2 Duo T9400M is above max MHz while being on high load?
➜ lscpu
[...]
Model name: Intel(R) Core(TM)2 Duo CPU ...
1
vote
1
answer
3k
views
Show all running node.js scripts using bash
To find a python script, I use pgrep -af python.
Is there a similar command to find node.js scripts?
1
vote
0
answers
3k
views
npm : Depends: node-gyp (>= 3.6.2~) but it is not going to be installed
I did the following steps:
git clone https://github.com/nibtehaz/NORTH-app.git
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs
npm install # which caused ...
1
vote
0
answers
567
views
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found [IP: 151.101.140.204 80] [duplicate]
I'm trying to get a project running locally on Deepin. The project relies on node 6.10, I understand that it's an old version but it works.
When the Dockerfile tries to run the sudo apt-get update, it ...
0
votes
1
answer
711
views
Using CPU affinity with taskset to speed up Node.js computation, blocked for extended chunks of time
I'm running online servers for a physics-based game with a backend in Node.js. Currently, the server can handle 10 games/worlds at a time before the next tick needs to be executed.
With this in mind, ...
0
votes
0
answers
63
views
Using unusual paths with commands
Assuming one has the following directory:
mkdir """
'''\n
"
And one queries the directory with:
stat --printf '%n' ** #or for simplicity stat --printf '%n' $'\n'\'\'\'\\n$'\n'
And captures the ...
1
vote
1
answer
751
views
Durring npm install: fs.js... binding.copyFile... Unknown system error -122
I'm getting the following when installing @sentry/[email protected] in a fresh node_modules (existing project). Needed for @sentry/webpack-plugin.
Is there any way I can find out more about this "unknown ...
4
votes
1
answer
3k
views
systemd service won't start nodejs
I'm trying to get my nodejs app to start on boot. It runs fine if I start it from the command line as the user odroid.
Here is my service file:
[Unit]
Description=ProImage
After=network.target mysql....
0
votes
2
answers
3k
views
Running http-server forever on ubuntu server
I have an ubuntu server. On which I have transferred some files which have some js and html code.
I used http-server from node.js to start a web server so that I can display the html page on the ...
0
votes
0
answers
110
views
Installation error in mongodb
I am trying to install mongodb from command line in debian 9. On running installation command i am getting following error
Reading package lists... Done
Building dependency tree
Reading state ...
6
votes
1
answer
4k
views
systemd service file for a node.js app is not working when pointed at a shell script
Before I mention my problem, I have already checked in most of the questions related to systemd, but I couldn't find a convincing answer. I wrote a nodejs app that runs a server.
const express = ...
0
votes
1
answer
1k
views
How to run tmux cmds in nodejs
Is there any way to run tmux cmds like tmux kill-server, tmuxinator attach etc. through nodejs. I have searched online but not able to find anything useful which can aid me to remove my error.
I was ...
0
votes
1
answer
228
views
Node service Active (running) but unavailable
I have just managed to get my service status active via the help of yourselves, however it still appears that the node service is not actually running.
So put simply, I know my node app is running, ...
0
votes
0
answers
6k
views
service: Start request repeated too quickly. (code=exited, status=127)
I am simply trying to start my node application as a service I am pointing to the server.js file and have that set as executable.
I would like to have this node app restarting on server reboot and ...
8
votes
1
answer
3k
views
"No such file or directory" when running node script [duplicate]
/usr/bin/env: ‘node\r’: No such file or directory
I keep receiving this output when i try to run something. Any ideas on how to fix this?
1
vote
1
answer
642
views
Can not install npm
I want to make an smart mirror, before I decide to buy a Raspberry pi I want to preview it on my old computer.
I installed Raspberry pi (desktop version from homepage of Raspberry).
Everything was ...
0
votes
1
answer
10k
views
JSON on the command line with jq in Jenkins
I used jq -r '.version' package.json command to filter the version from package.json file using the terminal.
Can we use jq command in Jenkins shell without locally installing it?
1
vote
1
answer
3k
views
Systemd custom service doesn't read PATH
I am trying to run a Node.js app as a service in Debian 9. So, following some tutorials, I've made a service like that.
[Unit]
Description=bumer API Http Server
[Service]
PIDFile=/tmp/bumer-service....
0
votes
1
answer
32
views
calling two versions of nodejs with different names
I have two version of nodejs installed. One in /users/anaconda/bin/ and another by homebrew
Now I want to use both NodeJS versions. I want to use conda version using conda-node and homebrew version ...
0
votes
1
answer
1k
views
Starting a node.js via cron fails silently
I am currently trying to set up a cronjob that will start a node.js server whenever that server is down.
For that purpose, I have written a simple script to test and start the node server.
#!/bin/...
-1
votes
1
answer
2k
views
Command line HMAC calulation is different from Node.JS crypto.createHmac('sha256')
In Node.js I use following code
hash = crypto.createHmac('sha256', SECRET).update(fileContent).digest('hex');
to calculate HMAC. C++/Qt code analogue
QByteArray hash = QMessageAuthenticationCode::...
2
votes
2
answers
5k
views
How to update npm to latest version on Fedora
I've try to run this:
sudo npm install npm@latest -g
to test npm audit, but this command failed, I've got error:
npm ERR! path /usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic
npm ERR! ...
4
votes
2
answers
4k
views
nodejs deb package seems to miss npm
I did on Debian testing sudo apt install nodejs but I'm missing npm.
$ node -v
v8.11.2
$ npm -v
bash: npm: command not found
What did I miss?
2
votes
1
answer
2k
views
connect to server with netcat and receive *multiple* files with one request/connection
Say I have an http or tcp server running, which serves tarballs (.tgz files).
Is there some way I can receive files individually so I can do something like this:
nc localhost 5000 | how can I read ...
0
votes
2
answers
3k
views
Can't access server after running it with a systemd service
I am trying to continuously run a nodeJs server on my VPS, I made a systemdservice and started it.
I worked by my server is still not accessible, I can check the status and it works Okey :
Service ...
1
vote
1
answer
12k
views
How to start node.js app on machine boot by creating a boot service
My machine is Ubuntu 16.04. I want to start my node.js application when the machine boots up everytime. According to this post about autostarting services. I tried to make a service by doing the ...
1
vote
1
answer
452
views
How much storage are node modules taking up?
How could I find out how much storage all my development projects' nodeJS modules are taking up?
Maybe there is a better way, but I have all the projects within a directory. I thought maybe using ...
1
vote
2
answers
5k
views
Give read permission to non-root user for root owned file?
How can I allow reading specific root owned files by a non-root-user executed process?
I'm running node.js under Linux/Ubuntu. I do not want to run my process with root authorization, but must have ...
1
vote
1
answer
9k
views
Unable to start custom systemd service for Nodejs: Node not found
I installed Rocket.chat on my Debian Jessie, it works well and I want to start it automatically at boot as a service.
To start Rocket.chat manually I need to
$ cd /home/hung/Rocket.chat
$ node main....
4
votes
2
answers
5k
views
Can't install latest NodeJS on Debian Stretch
I run Debian 9.3. I went to the NodeJS website to see how to install NodeJS v9.X on my machine and ran the code provided.
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get ...
0
votes
1
answer
4k
views
Why removing npm means removing nodejs as well on CentOS?
I'm trying to remove npm (EPEL repository), but yum wants me to remove nodejs as well. It's nodejs that is npm's dependency. Not the other way around. nodejs can live without npm just fine. Am I ...
2
votes
1
answer
5k
views
How to install Node.js and NPM in Debian?
I am trying to install the wallet for IOTA, as described here.
I run but the command is not found. I am not clear which package npm is in apt search npm where I do not find the corresponding ...
0
votes
0
answers
595
views
serverless update check failed error
I want to intsall serverless on my kali linux . In order to proceed for serverless installalation we need node js install , which i have already done .
root@gpunk:~# npm --version
3.10.10
root@gpunk:~...
0
votes
1
answer
313
views
What is the best way to install node from a tar file on Ubuntu?
The tar file I downloaded is a binary (not source) distribution. I read an article that said to run tar --strip-components 1 -xzf in /usr/local but if I do this I cant see an simple way to remove ...
1
vote
3
answers
7k
views
npm installation not working under Debian Stretch
I just tried to install node and npm on Debian Stretch. I installed node like decribed here.
After installing nodejs-legacy too I got the node command working but npm command still won't be found.
...
6
votes
1
answer
985
views
freeBSD: Atom Text Editor
Per Atom text editor build instructions for freeBSD:
pkg install node
pkg install npm
pkg install libgnome-keyring
npm config set python /usr/local/bin/python2 -g
Then:
git clone https://github.com/...