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-...
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
7
votes
Accepted
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 ...
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-...
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/...
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... ...
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
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
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 ...
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,
"...
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 ...
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 ...
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 ,...
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.
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 ...
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 ...
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 ...
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
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
npm × 68node.js × 35
ubuntu × 9
linux × 8
docker × 6
debian × 4
nginx × 3
centos × 3
ssh × 3
puppet × 3
systemd × 3
sudo × 3
vagrant × 3
amazon-ec2 × 2
permissions × 2
installation × 2
ubuntu-14.04 × 2
git × 2
apt × 2
ubuntu-18.04 × 2
elastic-beanstalk × 2
google-app-engine × 2
github × 2
maven × 2
apache-2.2 × 1