Using NPM on Digitalocean NodeJS droplet fails - node.js

I cloned my github repository onto a default NodeJS droplet on Digitalocean and everything works fine, I am running:
cd /my-project-directory
npm install
npm start
But I always get this error message: Imgur
The Digitalocean placeholder is already running in Node, I tried to kill the process but it always respawns before I can run npm start. How can I have my app run and be displayed when opening my-site.com in the browser?

Related

Ghost CMS Will not run on node lts

enter image description here
Why does ghost refuse to start? I installed it with ghost install local and it automatically started and ran fine. I ran ghost stop and now when I run Ghost start it complains about the node version.

angular universal host sitegroud

I have Created a new angular project and converted it to universal. After running npm run build:ssr i got file structure like this
dist
----my-project
---browser
---server
and when i run command npm run serve:ssr my server is running on port localhost:4000 but now i want to host my project on my siteground hosting server where i uplaod my dist folder file (browser and server) using filezila, but i got an error 404 then i upload package.json file and connect through ssh to my terminal and install first node after that i put command npm install on derectory where i have upload all file with package.json but again i am fail. please if any one have idea to help me.

NestJS server dies when console is closed?

I created folder for project, copy package.json and run npm install, build locally nestjs project and copy dist into server. Then ran in console node dist/main.js. For testing I used a base NestJS project (nest new ...) which only return "Hello word" on 3000 port.
Server work fine, but after close of console will stop.
I think problem on VPS (Ubuntu) settings or may be need to add some parameters to NestJS.
Why it not work constantly?
Thanks in advance for any advice.
I resolved problem with npm forever - https://www.npmjs.com/package/forever
install it globally - npm install forever -g
then got to project dir and run - forever start dist/main.js
Seems all work fine.

Node js Application- Getting 'command not found' after connecting project to github

I made a node js application and I was using nodemon to restart the server whenever I made changes, I made a repository on github and connected my node project. Now I can't run nodemon because it says command not found. I'm not sure about how to fix it.
install nodeman globally and try again,
hopes you do have configuration file and package.json
npm install nodeman -g

Heroku "npm install jugglingdb mongoose" Already did

I am trying Heroku, but i have run into a problem.
I deployed the Node.js app, but it crashed, I then tested it localy and find out that it was because it did not have run the command "npm install jugglingdb mongoose".
I did that and then it worked locally, then i tried
git add .
and
git commit -m 'db'
but then I get the message:
nothing to commit (working directory clean)
Then I think, "Okay, then i try to commit that to heroku, now it works on my local computer"
git push heroku master
But i just get
Everything up-to-date
Then i try restarting it and try my app again
heroku restart
But the logs says again = npm install jugglingdb mongoose
What could be the problem? I have also tried npm update and it did not update anything.
Ensure that your 'node_modules' directory isn't empty and your modules are installed inside your local project instead of the default NPM root:
npm update --binroot

Resources