Questions tagged [node.js]
Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine.
262 questions
0
votes
1
answer
3k
views
Problems with node path from bash scripts
I'm writing a script which at one point starts a simple node.js based website:
cd ../ap-site/ && npm start
When I run the above command from terminal there is no problem, but when run from my ...
2
votes
0
answers
478
views
Trigger event on host OS from inside a Docker container web app
I have a host OS (Ubuntu) with ClamAV installed. and I am running a Docker container on this OS. This container is running a node web app that is publicly facing.
There is file upload functionality ...
2
votes
1
answer
487
views
Kill other processes in pipe-line (programmatically)
Say I have this:
node a.js | node b.js | node c.js
if a.js is about to die, can I kill b.js? What about vice versa? It seems like if I establish this pipe, one process won't necessarily die/exit if ...
0
votes
2
answers
694
views
environment variables in relation to web servers and security
I want to set some environment variables on my linux box that can be accessed by a node.js server. These variables will contain sensitive information like database passwords and API keys.
My current ...
14
votes
6
answers
124k
views
How to fix exit status 127?
I attempted to follow this guide to run a Node application as a service. However, it is failing to start, with exit code 127. Is there any way to fix this?
This is the journal.
sudo journalctl --...
0
votes
1
answer
633
views
Ubuntu default page on 443 port instead node.js app
I'm trying to display node app on 443 port with SSL but server shows me default ubuntu page all the time. I've set redirect from 80 port to 443 and it's working fine.
Node app is working on 3000 port ...
0
votes
1
answer
2k
views
Run node app with SSL on 443 port (on 80 is working)
I am trying to configure a server running on Amazon EC2.
I figured out how to run my node app on port 80, but now I'm trying to run on port 443, with Letsencrypt SSL. Before to work on port 80 I ...
6
votes
4
answers
1k
views
Determine if process is "connected" to another process via pipes
If I do this:
x | y
is there any way to check, during the runtime of x, to see if it's connected to y? Note that I don't know what y is, and I am not responsible for starting y.
Specifically, I am ...
10
votes
4
answers
50k
views
Permission denied when we use npm start using webpack?
The following error will be displayed when i use the command "npm start".
> [email protected] start /var/www/html/dev/callcenter
> react-scripts start
sh: 1: react-scripts: Permission denied
...
1
vote
0
answers
574
views
Cannot access mounted volume in docker container
I download latest node images from docker, and try to run a container with the following command:
$ sudo docker run -it -v $(pwd)/app:/home/node/app --name node node /bin/bash
Then the container was ...
1
vote
1
answer
820
views
Get reference to stdin file descriptor of Node.js process, must work on MacOS too
On a Linux machine, if I have the pid of a process, I can write to the stdin of that process using something like:
/proc/<pid>/fd/0
but on MacOS, this doesn't appear possible. I am told that I ...
11
votes
4
answers
43k
views
systemd - My custom service exits with status code 216/GROUP
I installed the following unit file for an Nodejs Express Server:
[Unit]
Description=Server for SpeedBot
After=network.target
[Service]
ExecStart=/var/www/SpeedBot/server.js
Restart=always
...
2
votes
1
answer
3k
views
Get exit code from preceding command before pipe [duplicate]
I have this:
node ${SUMAN_RUNNABLE} | tee -a run.sh.log
EXIT_CODE=$?;
but it looks like the exit code is always 0 because tee is providing the code not the node executable.
Is there a way to capture ...
1
vote
1
answer
4k
views
Error during Nodejs installation on Debian
I'm trying to install Node on a Debian Docker container (specifically based off the nginx image). I checked for the correct install script to get version 6.x from nodesource but the curl part of the ...
1
vote
1
answer
3k
views
Installing node on elementary os
Right now when I run node -v I get 4.2.6. This is after having run:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
Elementary is an Ubuntu based distro....
3
votes
1
answer
1k
views
How does Node.js / the cluster module pass new connections from the master / parent process, to child processes?
How exactly does this work under the hood / at the OS level (primarily in Unix implementations / from the perspective of the sockets API)?
The cluster module documentation says:
"the master process ...
1
vote
0
answers
1k
views
Why can't I add this custom Node PATH to /etc/profile.d scripts?
I may have a problem in the include chain for the profiles, or something may be awry in either my system, or my understanding of profile.d (RHEL7).
I added a /etc/profile.d .sh script which is for a ...
0
votes
2
answers
375
views
How can I install the latest 6.x or 7.x versions of nodejs (April 2017) on a sid/stretch system?
Both the commands for node 6.x and 7.x fail with
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -sL https://deb.nodesource.com/setup_7.x | sudo -...
3
votes
1
answer
2k
views
Problem with gpg when using apt
I'm scratching my head to find a way to correct broken gpg stuff in apt.
When i try to install Nodejs :
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -
sudo apt-get install -y ...
5
votes
4
answers
744
views
Include more instructions on how to run file in hashbang or elsewhere
I have this at the top of a script
#!/usr/bin/env mocha
as most people know, this tells the OS which executable to use to execute the script.
However, my question is - how can we include more ...
0
votes
1
answer
148
views
Secure Java code on Linux
We developed an application which is running on a micro computer with a Debian distribution of Linux. The application is written in Java so it is not compiled as an executable file. (means java files ...
2
votes
2
answers
130
views
How to stop fedora from notifying me about nodejs updates?
I installed nodejs using dnf on fedora 25, then removed and installed the package from nodejs' website.
I excluded npm from dnf. Dnf stopped notifying me about npm updates but the software center is ...
0
votes
1
answer
85
views
Raspberry Pi Timed Shell script
I'd like a little help on how I would run a command over time. It's a node one. Basically I run a steam bot and I'd like it to restart over a certain amount of time. I'd like every 3 hours or just how ...
1
vote
1
answer
520
views
Compare path with user home and determine if first directory is ".nvm"
So I have this path as my present working directory:
/home/oleg/.nvm/versions/node/v7.2.1/lib/node_modules
Using a bash script, I want to determine if this directory is within my user home directory ...
0
votes
1
answer
745
views
Setting up node on Debian Jessie
I'm trying to get NodeJS installed on my server.
The instructions suggest doing:
sudo apt-get update
sudo apt-get install nodejs
To which I get:
root@steampunklinode:~# sudo apt-get update
Hit ...
3
votes
2
answers
2k
views
issues when installing nodejs for suse
I need to install npm in my suse distribution, so naturally I followed https://software.opensuse.org/download.html?project=devel%3Alanguages%3Anodejs&package=nodejs and https://nodejs.org/en/...
0
votes
1
answer
461
views
after compiling node.js from source atom fails to load from command line only
drupal@drupal-pc:~$ sudo find / -type f -name "libnode.so"
find: ‘/run/user/1000/gvfs’: Keine Berechtigung
/opt/atom/libnode.so
drupal@drupal-pc:~$ atom
atom: error while loading shared libraries: ...
2
votes
1
answer
3k
views
Reverse SSH - Raspberry Pi and AWS
I have a Raspberry Pi that is connected to the internet via a USB modem.
Due to my ISP, I unfortunately cannot get the public IP address of my dongle itself, and I get the actual cellphone towers.
I ...
1
vote
1
answer
84
views
Besides disk access, is there performance penalties in running a program from USB drive?
I would like to run a nodejs server on an openwrt router. Because node is too big to be installed on my router's flash, I need to run it from a USB drive. I know that reading and writing is slower on ...
0
votes
2
answers
961
views
Install unix program without internet access
I have a red hat server (server 1) which does not have access to internet. I also have another another red hat server (server 2) which DOES have access to internet and it can also access server 1.
I ...
2
votes
0
answers
493
views
How to fix node in armv5
I am trying to fix nodejs on mlinux. So when i do a uname -m the output is armv5tejl. It came with pre-installed node and npm. I tried to upgrade but somehow i think I have broken something.
Now when ...
4
votes
1
answer
1k
views
Does the Linux version of Node.js come bundled with libv8?
I'm a bit confused as to how Node.js gets access to libv8.
I downloaded the 64-bit "Linux Binaries (.tar.xz)" for version 6.5.0 of Node.js and extracted them to /opt on my Debian Linux machine. When ...
2
votes
1
answer
3k
views
how do I know if and why linux is killing my processes?
I'm working on one of amazon's linux distros (4.4.11-23.53.amzn1.x86_64). (1gb ram)on that instance
I am running node.js with the forever module. (It makes sure to restart the node.js process if it ...
4
votes
2
answers
17k
views
What is the most efficient way to check if Node is currently installed?
I am writing a script that will first check if Node is currently installed, if not it will install the latest version of Node. If it is installed, then it will proceed to another function to update it....
0
votes
1
answer
2k
views
CentOS Multilib problem with libgcc
My friend's computer running CentOS 5.6, trying to install hhvm, but it got an error:
$ yum install hhvm
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Setting up Install Process
...
1
vote
1
answer
219
views
create user with only permissions to execute C Programs
I am trying to build online code editor. My scenario : Through the web server a request is received for a 'C' program -the root user creates the file, compiles the file and acks success to the user.
...
0
votes
1
answer
617
views
controlling wpa_supplicant using node.js
I would like to control wpa_supplicant using a node.js module.
Most importantly I want to be able to detect connection failures so I can write a program that can act upon them.
So far setting up a ...
0
votes
1
answer
43
views
NPMJS Forever and Logfiles
Does Forever always have its own log file? I have the following process running:
data: uid command script forever pid id logfile uptime
...
2
votes
2
answers
4k
views
NodeJS - error npm undefined symbol uv_fs_realpath
i'm trying to install yo (linux) using npm
npm install -g yo
but i get this error :
node: symbol lookup error: node: undefined symbol: uv_fs_realpath
when i only type npm, it return same error ...
1
vote
1
answer
2k
views
Pass Environment Variable to Sudo AWS ec2 sudo node
I am new to linux and AWS. I have a node.js server running on an EC2 instance. I am running the following command to keep it running endlessly and on port 80:
$ sudo node app.js &
Now when I ...
1
vote
1
answer
686
views
How can I make node.js automatically load config files?
In my mac os x computer, node.js, you can use 'require()' to load your configuration files, but I am tired of having to do that on all my programs. Is there a way to make node.js automatically load ...
3
votes
1
answer
2k
views
How to Install latest version of Node js for Elementary OS (ubuntu)
I have downloaded node v5 for Linux on the *node website and found some instructions on how to Install a tar.gz file but this file ends with tar.xz and I can't find any instructions for that. Please ...
2
votes
1
answer
2k
views
Using an older version of Node and NPM on FreeBSD
I need to install an older version of NODE and NPM on freebsd to work with GHOST, a pretty cool blogging platform. I want to do this on my own system, preferably on a FreeBSD VM.
The system is setup,...
1
vote
0
answers
472
views
npm install couchbase on linux machine failing
I am trying to move node js application from windows machine to linux machine for QA environment and I am having trouble installing couchbase module on linux machine.
It ran fine on windows machine ...
11
votes
3
answers
23k
views
Why is yum trying to install the wrong version of node.js?
On a CentOS 7 server, I am trying to install version 5.x of Node.js, but for some reason, yum keeps trying to install version 0.x and returning an error when it cannot find version 0.x at the 5.x ...
1
vote
1
answer
2k
views
How does one remove a tar-installed Node.js from CentOS 7?
A CentOS 7 server has v0.12.7 of Node.js installed, and the installation was done using a tar. This is leading to conflicts when I try to install a more modern version of Node.js using yum. What ...
18
votes
8
answers
37k
views
Why won't the correct new version of Node.js install on CentOS 7?
Note: This is partially solved, but needs a little more attention. See notes at bottom of OP, and @Digisec's partial answer.
I am trying to set up Node.js on CentOS 7, but the following commands ...
8
votes
1
answer
5k
views
Node JS - get FQDN [closed]
How can I get the FQDN (Fully Qualified Domain Name) of the machine on which node is running?
os.gethostname() is not sufficient, since it usually returns the unqualified DN, only. Same thing for dns....
1
vote
2
answers
3k
views
Ruby gems not recognized in bash script
I have built a node.js app that listens for webhooks. Currently it is used to build a jekyll website.
I have configured it on my server and jekyll build works perfectly when I run it in the root of ...
1
vote
1
answer
515
views
SASS (gulp) failing
My gulp is failing. It's a clean install. Installed as non-superuser and using as non-superuser.
I am in /X/ when running gulp.
It works straight from install on other machines.
I have done a ls -l $(...