9 votes

How to configure Systemd service unit to start Node app with "npm start" instead of "app.js"

I'm running a similar setup on Debian, and my service looks like this: ... [Service] Environment=NODE_PORT=3000 Type=simple User=www-data Restart=on-failure WorkingDirectory=/var/www/<your-code-...
filipe's user avatar
  • 191
9 votes

Centos 7 Can't yum install npm

On Centos 7, for installation of npm and nodejs, follow these steps 1. Open terminal 2. Run these commands (With sudo or root) yum install epel-release yum install npm nodejs
Hafiz Muhammad Shafiq's user avatar
7 votes
Accepted

Node-sass error during installation of node modules

Solution is npm install --no-optional
Emil Moe's user avatar
  • 209
5 votes
Accepted

NodeJS React Systemd Service not working

I encountered the same problem after an upgrade, my systemd service started exiting with error code 0 every time it was started. This is due to a February update to react-scripts start.js Kolega's ...
user568722's user avatar
3 votes
Accepted

Library Error while installing NPM on Ubuntu 22.04 LTS

Looks like you are missing the updates channel. When I run apt show libssl-dev -a I get two versions of the package listed: Package: libssl-dev Version: 3.0.2-0ubuntu1.6 Depends: libssl3 (= 3.0.2-...
Gerald Schneider's user avatar
3 votes

How to configure Systemd service unit to start Node app with "npm start" instead of "app.js"

I didn't have luck with filipe's answer but I found this one that is very close! [Unit] Description=My application [Service] Type=simple Restart=always User=nobody Group=nobody WorkingDirectory=/opt/...
Sean D.'s user avatar
  • 31
3 votes

Running npm via sudo (not as root, not as self-user) can't find npm where root or self-user can

This is probably because you have an env_reset directive in your sudoers(5) file. By default, the env_reset option is enabled. This causes commands to be executed with a new, minimal environment... ...
user9517's user avatar
  • 116k
3 votes
Accepted

How to install NPM on Debian?

If you don't have sudo installed, then your command string should be this instead: curl -sL https://deb.nodesource.com/setup_9.x | bash - apt-get install -y nodejs
Andrew's user avatar
  • 2,172
3 votes

NodeJS React Systemd Service not working

I solved this by adding the following to the [Service] section of my .service file: StandardInput=tty-force
Steve Klein's user avatar
2 votes
Accepted

NPM issue, where to start

Your CentOS is just too old. You can check which package the library belongs to by running yum provides /usr/lib64/libstdc++.so.6. In my case (on CentOS 7, but that doesn't matter for this) this is ...
Gerald Schneider's user avatar
1 vote
Accepted

Npm install and ng build takes 35-40min

I found solution :) The problem was with the build configuration, I had optimizations turned on everywhere, I changed the configuration in angular.json to " optimization": false, "...
PawelC's user avatar
  • 179
1 vote

How to assign which user to execute commands inside the container in AWS FARGATE

You should build the container in such a way that it works right after starting without executing extra commands. Maybe a tutorial on Dockerizing node.js apps may come handy for start. Hope that helps ...
MLu's user avatar
  • 25.4k
1 vote

NodeJS React Systemd Service not working

If you want to have non-exiting service, with npm start you have to define a CI variable which prevents quitting after reading EOF. This solution can be run in users session as well. The important ...
Ondřej Kolín's user avatar
1 vote

Babel 6.26.3 keeps getting installed instead of version 7.7

Ok, so after discussing with one of the maintainers of Babel ( https://github.com/babel/babel/issues/10688#issuecomment-552114492 ) , he helped me with the solution. I was trying to install babel-cli ,...
Andrew Newby's user avatar
  • 1,154
1 vote
Accepted

Cannot install npm on an embedded Debian hardware:

Change your sources.list, first line deb http://debian.moxa.com/debian/ jessie main contrib non-free to deb http://debian.moxa.com/debian/ jessie main and retry your setup.
Gerard H. Pille's user avatar
1 vote

How to install NPM on Debian?

Andrew's answer was really helpful but didn't work out of the box because debian still wanted to install the old version of nodejs not the one from the repo. I fixed that by forcing debian to install ...
Ramast's user avatar
  • 171
1 vote
Accepted

Jenkins Docker build slave - npm cache not working

I finally solved this by using Docker image layer caching for the npm install, following this answer This means I moved the npm install out of the Docker slave image and into the actually frontend ...
Brian's user avatar
  • 331
1 vote
Accepted

docker npm ERR! install Couldn't read dependencies

This is error thrown due to expiry of npm for Ubuntu 14.04 to get around quick fix add lines ADD package.json /opt/flask-app RUN npm config set strict-ssl false After these lines # copy our ...
Vidya Sagar Mahankali's user avatar
1 vote
Accepted

How to launch let'schat (nodejs app) as deamon?

You need to set both ExecStart= and WorkingDirectory= to the appropriate values. For example: WorkingDirectory=/MIDDLE/uow/lets-chat ExecStart=/usr/local/bin/node /MIDDLE/uow/lets-chat/app.js
Michael Hampton's user avatar
1 vote

How do I get the SSH key of my EB instance so that I can give it deployment access in BitBucket?

You will need to generate a keypair for your application to use. The private key gets deployed to your EB server, in whatever location your application needs, and the public key gets added to your ...
EEAA's user avatar
  • 110k
1 vote

google engine 502 bad gateway during fetch npm package

Though this question is a little old, this was an issue with the NPM registry that affect 0.5% of all package tarballs. The error was born of a discrepancy between Nginx's ETags and the NPM CDN's use ...
Nicholas's user avatar
  • 236
1 vote

Centos 7 Can't yum install npm

I have make a copr repository which provide the latest (sync with the Fedora rawhide) NodeJs and NPM. It also contains the build dependencies should you want to rebuild it. Note that to build the ...
Ding-Yi Chen's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible