npm install globally a package offline with tarball

According to npm docs, this should work; npm install ./package.tgz So I try this globally for pm2 tarfile I have downloaded from pm2 github repo releases page; npm install -g ./pm2-3.2.2.tar.gz But I got this; npm ERR! code ENOTFOUND npm ERR! errno ENOTFOUND npm ERR! network request to https://registry.npmjs.org/@pm2%2fagent failed, reason: getaddrinfo ENOTFOUND nb nb:443 … Read more

Nginx rewrite proxy pass (For node react app)

I am running a Node React app on localhost:3000, which I am reverse proxying with Nginx and exposing on localhost/web/. However, there are issues with the files generated by the app, because they are not referenced correctly. For example, some .js files are generated in localhost:3000/static/js, but the links are not correctly referencing the relative … Read more

Program installed for one user cannot be accessed from other user even full path is provided

I have all the npm pacakages installed for a particular user (i.e) not root (/home/otheruser/*) I am using monit to see whether to check the program is running. In this case its pm2, which is in /home/otheruser/.nvm/versions/node/v5.2.0/bin/pm2 I cannot use pm2 even when I tried using the full path from other users in the terminal … Read more

NGINX not serving a maybe static HTML File

About my setup: I have an npm-app running that is using React and the index.html file is located in /var/www/example.com/new/frontend/public. I’m using Debian 10 with the app listening on port 8080 (80 is already taken by nginx) If I connect via the direct IP followed by the port (e.g. 192.0.2.90:8080) the webpage loads just fine, … Read more

how to fix the npm install fails with ‘An unknown git error occurred’ in one folder but works in a another folder

My Server runs on Centos 8 and I installed nodejs latest (v14.17.5) and NPM (v7.21.0), both dont have a .git folder in there. I have a very very strange issue, If I goto folder example1.com, and run npm install I get the below error, [root@www centos]# cd /var/www/example1.com/httpdocs/ [root@www chat]# npm install npm WARN old … Read more

npm script not able to use executables from node_modules.bin directory

My npm script in package.json looks like this: “build”: “$(npm bin)/react-scripts build”, OR “build”: “react-scripts build”, It throws the following error: Error: Cannot find module ‘../scripts/build’ Require stack: – /codebuild/output/src573716697/src/node_modules/.bin/react-scripts at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15) at Function.resolve (internal/modules/cjs/helpers.js:80:19) at Object.<anonymous> (/codebuild/output/src573716697/src/node_modules/.bin/react-scripts:31:23) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] … Read more

My webSite on Heroku Won’t Open

voila, I’m a new user of Heroku and I just put my web app made in NodeJs. The problem is that when I launch the site I receive the message: Application error. Looking at the log I got the following message: Process exited with status 1 2022-03-18T02:07:05.285138+00:00 heroku[web.1]: State changed from starting to crashed 2022-03-18T02:07:34.177569+00:00 … Read more

Bad output for “npm ls”

How can I fix this ugly output for “npm ls”? Debian Wheezy / node v0.10.36 / npm 2.4.1 UPDATE: «*» – is an ugly char, that I can not reproduce here: helloworld@1.0.0 /var/www/helloworld *** express@4.11.2 *** accepts@1.2.3 ***** mime-types@2.0.8 ***** mime-db@1.6.0 ****** negotiator@0.5.0 Answer I have changed Putty encoding to UTF-8 and the problem was … Read more

google engine 502 bad gateway during fetch npm package

I’m getting weird 502 error while trying to fetch npm package inside of google service instance. Error is constantly repeating on Google App Engine (Docker container deployment procedure), and Google Compute Engine instance (while trying to simple GET with curl or wget). yesterday all works fine, nothing changed in configs error happened on both urls: … Read more