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
1k
views
Linux tar: You may not specify more than one tar '-Acdtrux', '--delete' or '--test-label' option
I am trying to install the latest Node on my Linux system by running the following terminal command, I keep getting the following error.
tar: You may not specify more than one '-Acdtrux', '--delete' ...
0
votes
0
answers
517
views
Crontab running a Node.js script
I have a script that runs at boot and every 1 min after. This is a nodeJS script that executes a nightmare/cheerio to scrape a cricket site for scores. This script itself runs until killed when ...
1
vote
1
answer
3k
views
Getting an error processing archive when I try to install NodeJS LTS on Kali Linux
I am trying to install NodeJS LTS version, actually 14.16.0, and I am getting an error processing archive like this one:
Do you want to continue? [Y/n] Y (Reading database ... 415599 files
and ...
2
votes
1
answer
5k
views
how to download partial content from remote video url in nodejs?
I have the following code to download a specific part (range) of a video using nodejs http.get(),
const fileUrl = 'https://www.example.com/path/to/video.mp4'
const fs = require('fs')
const http = ...
0
votes
0
answers
215
views
Super Keys cannot be remapped using xmodmap
I'm developing an application with a kiosk to it. It's an examination delivery platform, and I'm developing the Linux version through electron.js. I'm looking to kiosk the application by forcing a ...
-1
votes
1
answer
797
views
How can I install nodejs manually in Linux from terminal [closed]
I have downloaded Nodejs in my Linux VM from nodejs.org, I want to install it from terminal. VM have node v0.12.18 manually installed by someone else, I don't know how to do that. As I am installing ...
0
votes
2
answers
824
views
How to install nodejs in linux vm if wget is not working
I want to install nodejs in Linux from command prompt. I am using
wget http://nodejs.org/dist/v15.6.0/node-v15.6.0-linux-x64.tar.gz
but getting error
--2021-01-15 16:15:42-- http://nodejs.org/dist/...
0
votes
2
answers
2k
views
Bash replace multiple lines in a file between two patterns with the content of another file?
I have a long javascript file long.js which has this content as a part of it
... more lines
ProcessCoverageController.createExampleQueries = function () {
return [
{
title: '--...
0
votes
1
answer
1k
views
Error: Package: 1:npm-3.10.10-1.6.17.1.1.el7.x86_64
I got this what looks like a node problem when I try to update CentOS7. Could be kernel, this is when I get confused.
[root@orcacomputers orca]# yum install npm
Package 1:npm-3.10.10-1.6.17.1.1.el7....
1
vote
1
answer
847
views
node js command line interpreter?
Is it possible to make Node the CLI interpreter? Can we have 2 terminals with different interpreters?
Is there any huge drawback to use Node here?
I know how to list files, but How would we run a ...
0
votes
0
answers
26
views
Javascript -- Prey project -- Os: does not exist
I'd been using Prey Project on and off for years, and I just realized it wasn't working. So I'm trying to re-initialize my setup ...
Since I'm running Slackware and not Ubuntu, it refuses to run:
...
2
votes
1
answer
347
views
What is a good temporary install directory for Debian packages?
I'm writing the debian packaging for a Meteor application. The meteor build command will create a "bundle" that requires npm install to be run on it (to resolve its node.js dependencies); ...
2
votes
1
answer
1k
views
Unable to run npm install with version specification
I am trying to run a simple npm install with zsh terminal.
npm install --save-dev @typescript-eslint/eslint-plugin@^4.0.0
zsh: no matches found: @typescript-eslint/eslint-plugin@^4.0.0
It appears ...
0
votes
2
answers
81
views
Build old node on Freebsd shared hosting
We have an access to ssh on our shared hosting account. Sysadmin informed us that he will remove the old version of node soonish, hence if we want to still use it, we have to create our local copy. ...
0
votes
1
answer
70
views
Sending email from website hosting within raspberry pi
Hello I want make my website able to do simple function as sending email to any email address I want. I know how to do it in webiste host within my PC and there are plenty instructions, However if i ...
0
votes
2
answers
380
views
Do all debian based linux distributions use sudo as user that has the ability to do anything on a system?
We are creating this nodejs script for Debian version 9 or 10, to be specific, but it needs to run as sudo or a user that has same privileges as root. Below is sample code:
exec('iptables -S',
...
0
votes
3
answers
1k
views
How to set cron job correct path to run a node.js script?
I'm trying to automate a Node.js file to run on schedule.
But I can't get it to work.
I'm using root user.
This is the path to get to the file location from login:
nodejs_projects/amazon_search_v2
...
5
votes
3
answers
24k
views
How to resolve libatomic missing error, or more generally, install nodejs
I'm trying to install node/npm (and ideally I'd like to do it with nvm) on my BananaPi, but when I run nvm install v12.18.4, I get the error:
node: error while loading shared libraries: libatomic.so.1:...
-1
votes
1
answer
510
views
Is running a nodejs application as root dangerous in all cases, or only when it's exposed to the web?
I've heard over and over again that it's dangerous to run a nodejs application as root, but I'm curious, does that apply to personal applications for administrative purposes on a home computer, or is ...
4
votes
1
answer
10k
views
How to handle a too large cookie, causing Nginx to return a 502?
Our Nginx server is currently returning a 502 for a user, for our NodeJS based application and the error logs indicate:
2670 upstream sent too big header while reading response header from upstream
...
-1
votes
1
answer
2k
views
How to run the same node file multiple times simultaneously in linux? [closed]
I need to run the same nohup node app.js & simultaneously in multiple processes.
3
votes
1
answer
2k
views
systemd exits create-react-app
I am trying to use a systemd service to run a Node app (specifically, a React app generated with create-react-app. I put a file frontend.service at /etc/systemd/system/ with (minimally) these ...
0
votes
2
answers
14k
views
Why I get "Access denied for user \'root\'@\'localhost\' (using password: NO)" after I added .env variables?
I'm using mariadb with nodejs on centos 8. Whenever I add process.env variables to my mysql.createConnection function I get error Access denied for user \'root\'@\'localhost\' (using password: NO) but ...
0
votes
1
answer
89
views
How to call node and npm in my os?
I want to install npm and node.
sudo apt-get install -y npm nodejs
It encounter some warning:
Unable to correct problems, you have held broken packages
Now try hard to fix the dependencies of broken ...
0
votes
0
answers
2k
views
How do I remove unnecessary versions of node in Centos
I am trying to learn how to use node.js in centos 8
I have installed node.js and npm, and using npm I have installed inherits and n
I have been following tutorials on different websites and have been ...
0
votes
0
answers
132
views
Black, flat, modern emojis - Debian
I have been trying to find a package that provides me with flat, black emojis to use in my node.js application.
I have tried ttf-ancient-fonts but the emojis don't look flat or modern
Is there a ...
1
vote
1
answer
2k
views
Shell script throwing /usr/bin/env: ‘node’ on npm install [duplicate]
I cant seem to figure this out, although reading a lot of threads with this problem.
Summarize the problem
From a shell script, login in to remote server, pulling a git repo and trying to run "npm ...
0
votes
1
answer
1k
views
How to assign loaded nodejs module to a variable in Bash?
I don’t understand anything in the Bash language yet. I decided to learn how to make an NPM module. I made it for use through a connection in files. But then I decided to make it possible to execute ...
4
votes
2
answers
7k
views
Problem installing nodejs on Centos (with yum and building from source)
I am trying to install lastest nodejs on CentOS:
[root@test-visitele ~]# uname -a
Linux test-visitele 3.10.0-1127.el7.x86_64 #1 SMP Tue Mar 31 23:36:51 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
[root@...
1
vote
1
answer
698
views
Named pipe stdout redirection instead of numeric file descriptor
So I was fiddling around for hours now. I have the following problem:
I am running a command (node.js script) that writes to stdout via process.stdout.write. It is interactive and at one point it ...
0
votes
1
answer
1k
views
How to use Triggerhappy deamon to overwrite files
I have Rpi4 with Volumio 2.729 installed. I use Triggerhappy to run a node.js script when keyboard button is pressed - the script will play corresponding internet radio station:
module.paths.push('/...
0
votes
1
answer
805
views
NodeJS React Systemd Service not working
I am trying to set up a systemd service for a simple react application. This application is hosted in /home/myuser/test. Both npm and node are in the PATH and hard linked to /usr/bin. All the files ...
0
votes
1
answer
641
views
Getting error when installing bufferutil npm package
I've a problem install my application on my server. Locally everything works fine. The versions of node and npm are the same but I'm still getting this error during my install on the server:
91 ...
0
votes
1
answer
2k
views
Unpack Node.js to a custom folder and perform paths setup
I want to unpack Node.js (Linux Binaries (x64)) to a custom folder and use it for a few projects.
The difficulties appear when I start using console. I can't use npm at all and I've got no idea how ...
2
votes
1
answer
722
views
Deb build-dependencies in custom locations
I have a debian package with npm build dependency, e.g, the control file contains the line:
Build-Depends: debhelper (>= 11), npm
Building this package works fine if I have installed nodejs using ...
2
votes
3
answers
1k
views
What is the Linux equivalent to Windows \\ folder route path?
We have some route path in our project like this line:
"start": "set NODE_ENV=local&&node_modules\\.bin\\webpack --config webpack.dev.config.js"
How is the equivalent in Linux? We are using ...
0
votes
1
answer
199
views
Trying to create a start-up nodejs script Ubuntu
This is the first time I try to create a start-up script for Ubuntu. I need to launch an express server for my API and I have followed Making Node.js service always alive on Ubuntu Server.
So my ...
1
vote
0
answers
636
views
NodeJS child_process.spawn() behaving different when run as systemd service on Debian 10
I am working on a NodeJS application, that runs expressJS and uses twinkle to dial a telephonenumber.
Given the following function:
export const call = (telNr: string, res: Response|undefined = ...
1
vote
1
answer
3k
views
PM2 Nodejs Need help with daemon ownership and permissions
I am struggling with under which accounts I should be running the daemon and how to add applications.
I currently have it under root.
PM2 v4.2.3: God Daemon (/root/.pm2)
But when I run my bash ...
0
votes
1
answer
568
views
How to install latest nodejs (13) on OpenSUSE?
It seems that the most recent version in standard package managers is nodejs10. Is there any options to install nodejs13 or at least 12, or nvm?
None of instructions I found on the Internet worked ...
0
votes
2
answers
660
views
Issue running node in nvm on Manjaro - maybe OS level error but not sure as I am a beginner
I joined to ask this question as it did not seem like a stack overflow question.
Question: Node and npm running on nvm installed and working, but nothing (that I have tried) works as I get errors. I ...
3
votes
1
answer
2k
views
How to install node package globally - the right way?
I am trying to avoid installing common Node packages redundantly for each user. I would like to install certain common Node packages globally. However, on Arch Linux, I encounter permissions issues.
...
1
vote
0
answers
7k
views
systemctl start custom.service does not return
This is my custom service file (elastalert.service)
[Unit]
Description=Elastalert
Documentation=https://elastalert.readthedocs.io/en/latest/elastalert.html#configuration
Wants=network-online.target
...
0
votes
0
answers
263
views
how to install angular on centos 7
After installing npm v6.12.0 , and node v10.3.0, I start installing angular on my machine centos 7
when it comes to the execution, that gives the following exception:
[root@localhost ~]# npm ...
0
votes
1
answer
1k
views
Read output from screen
I want to build an Minecraft Webinterface using a NodeJs backend server which communicates with a Bash Shell Script on Debian 9.
1: I create a new Minecraft Server using screen -S server_name java -...
3
votes
2
answers
12k
views
What's going wrong with my attempt to install/upgrade Node.JS in Linux?
OS: Linux Mint 18.3. Similar to Ubuntu.
As ever with Linux I don't really know how I'm meant to go about installing software:
is it already on the system? In this case yes, but it's very old: 4.2.6. ...
0
votes
1
answer
2k
views
Apache 2 Virtual Host allow serving all files from a directory
I have an Apache 2 server installed on my Debian system. The Apache listens on port 80. Then I have a simple nodeJS server listening on port 8080. I want to use the Apache as proxy for the nodeJS ...
-1
votes
1
answer
789
views
how to configure CORS (Cross Origin Resource Sharing) in systemD service?
setting CORS (Cross Origin Resource Sharing) in systemD service doesn't work.
I have a node module with CORS (Cross Origin Resource Sharing) enabled, now my question is how can I move the CORS ...
3
votes
1
answer
2k
views
Newest version of nodejs is not intalling in Linux Mint Tina
Environment
Linux Mint 19.2 Tina 84_x64
Installation
$curl -sL https://deb.nodesource.com/setup_10.x | sudo bash -
## Installing the NodeSource Node.js 10.x repo...
## Populating apt-get cache...
...
2
votes
1
answer
1k
views
Installing nvm using Makefile
I've set up a Makefile like the following:
NVM := $(shell command -v nvm 2> /dev/null)
setup:
ifndef NVM
@echo "Installing NVM"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0....