Questions tagged [node.js]

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript engine.

From the Stack Overflow tag wiki for node.js:

Node.js is an event based, asynchronous I/O framework that uses Google's V8 JavaScript Engine.

251 questions
70
votes
5 answers

nvm command not available in bash script

I am trying to build a script in in which nvm and eventually node will get installed. I have installed nvm with cURL. I see the modifications in the .profile or .bashrc file (both work) and when typing the nvm at the bash prompt, it shows the…
okidoki
  • 703
  • 1
  • 5
  • 5
50
votes
6 answers

Universal Node.js shebang?

Node.js is very popular these days and I've been writing some scripts on it. Unfortunately, compatibility is a problem. Officially, the Node.js interpreter is supposed to be called node, but Debian and Ubuntu ship an executable called nodejs…
30
votes
5 answers

How to install latest NodeJS on Debian Jessie?

I just installed NodeJS & NPM on Debian Jessie using the recommended approach: apt-get install curl curl -sL https://deb.nodesource.com/setup | bash - apt-get install -y nodejs However it’s a pretty old version (node v0.10.38 & npm 1.4.28). Any…
MrColes
  • 403
  • 1
  • 4
  • 5
29
votes
2 answers

Recommended location of node.js applications in linux filesystem?

Where is the conventionally accepted location of node.js/express web apps, in a linux file system? Currently I've got a subdirectory in /opt/ but I'd like to hear other people's view on this...
UpTheCreek
  • 828
  • 3
  • 10
  • 17
18
votes
6 answers

how to fix missing libcrypto.so.1.1?

So i first encountered this problem when i tried to run nodejs on my system. And i got this error message node: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory I also encountered it…
Komiš
  • 181
  • 1
  • 1
  • 3
17
votes
8 answers

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 are failing to install the latest version. What do…
CodeMed
  • 5,079
  • 45
  • 100
  • 147
11
votes
5 answers

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 --follow -u serviceName -- Logs begin at Tue 2017-08-08…
Chris Talman
  • 211
  • 1
  • 2
  • 4
11
votes
3 answers

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 download site. The error indicates that yum is…
CodeMed
  • 5,079
  • 45
  • 100
  • 147
11
votes
1 answer

Why is permission denied for npm start using node-dev?

I am trying to start a node.js application with on a low permissions user. All the files I know of are owned by the correct user and have permissions set reasonably well. I'm trying to use a script file to do this. I invoke the script with this…
Patrick M
  • 243
  • 1
  • 3
  • 8
10
votes
6 answers

What's the currently recommended way to install node.js on Debian?

I've found a few different methods on the web, but some of the articles are quite old, and I'm concerned that the methods they describe have been superceded. Can anyone tell me what the currently recommended method, to best utilise package…
UpTheCreek
  • 828
  • 3
  • 10
  • 17
10
votes
1 answer

Please set env variable CHROME_BIN

> node node_modules/karma/bin/karma start test/karma.conf.js INFO [karma]: Karma v0.12.30 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome ERROR [launcher]: Cannot start Chrome Can not find the binary…
John
  • 235
  • 1
  • 3
  • 9
9
votes
4 answers

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 npm ERR! Linux 4.4.0-1013-aws npm ERR! argv…
Eswaran Arumugam
  • 91
  • 1
  • 1
  • 2
8
votes
1 answer

Node JS - get FQDN

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.reverse(ip, callback) - assuming the ip is the…
jelmd
  • 349
  • 2
  • 7
7
votes
1 answer

"No such file or directory" when running node script

/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?
7
votes
3 answers

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 User=nobody Group=nobody …
medicengonzo
  • 191
  • 1
  • 1
  • 2
1
2 3
16 17