I cannot start my nestjs project after a reboot - node.js

I don't know what happened prior to this issue but after each reboot i have to fully remove npm and nodejs, reinstall both npm and nodejs in order to start my nestjs project.
After rebooting running the npm run start command in my nestjs project, npm stops halfway and exits without any error codes (Link below of the terminal output).
https://i.stack.imgur.com/zrbXp.png
What could it be? Is there perhaps some system path that gets wiped on reboot?
Any help or pointers would be greatly appreciated

Turns out both my angular project and my nestjs project required me to run a very specific version of node. anything else resulted in a silently crashing nestjs application with no errors.
For anyone stumbling into the same problem try fiddling around with the node version you're running
npm install -g n
n 10

Related

Could not resolve dependency: reactjs "npm install" on MacOS

I'm getting this error when I try to "npm install" in a reactjs app i'm trying to get running on my MacBook. I'm pretty new to working with reactjs and actually haven't coded for a really long time. But trying to get my feet wet again by setting up a development environment to work on an app that others have been writing so far.
Anyone know what the best way is to resolve this?
I'm hesitant to "force" it because I think that's likely to lead to a bunch of other issues. Want to go about this correctly. I have actually got this app running on remote servers running Linux before now and never had this issue.
There seems to be a conflict between the dependency versions in the project. Just run this as suggested in the error log:
npm install --legacy-peer-deps
If this doesn't work you'll have to take your chances and use the force flag. You can always go back if things don't work out
npm install --force

Nodejs module not found

I'm trying to install socket.io on localhost.
I installed nodejs like this:
1. npm install pm2 -g
2. npm install socket.io
3. pm2 start C:\xampp\htdocs\server\app.js
Yesterday It was successful and I worked on my project.
But today when I start same file again, I get an error like this;
https://i.imgur.com/V89qWhP.png
And I open logs, the message showed:
https://i.imgur.com/pLj5dgx.png
I'm trying to solve this problem for hours.
I even tried to reinstall Node at least 4-5 times.
Still same problem, please help.
At first glance I would recommend you to run a npm install before starting your app.
We need additional information about your require statement, your package.json dependencies and the full error message.

Getting started with Create React App - "Cannot find module"

I'm using the "Getting Started" guide because I've been experiencing endless errors trying to create a react app so far when following tutorials.
And straight away I'm running into a problem. When I run npx create-react-app my-app I get the following:
Cannot find module 'C:\Users\Aristophanes\node_modules\create-react-app\index.js'
Can anyone advise me what I'm doing wrong? Thanks.
This must be a problem related with your node installation (maybe you removed manually create-react-app package?). I'd recommend following these steps:
Uninstall node and npm
Delete the npm cache and npm modules in your machine (In Windows machine you can usually find them at C:\Users\ {username} \AppData\Roaming\npm-cache and C:\Users\ {user name} \AppData\Roaming\npm) respectively.
Install node and npm again
If you really don't want to delete node and npm, try step 2 and see if that works. Following these steps did the job for me, hope that helps you.
I think you might miss installing Node and npm in your machine.
I had same issue a few times. Every time I was searching thru net for a solution, and for every time i just typed in terminal
npm i node
and its just started working

Starting node server gives node fibers error

I was working on node. Everything was fine. I reinstalled my windows and now when I start node server, it gives me the following error.
I reinstalled fibers as well but still the same issue. Any guesses what I should do?
Thats sounds to me for reinstalling node.js completely, see e.g. this post.
The hard thing is to install the globale modules (those which you have installed with npm -g before you've started the project). From your project make a copy without the node_modules and enter npm install. This worked for me, but I have to deal with the error messages which are missing the global modules.

PM2 or any npm module Stuck at the start of installation

I am trying to install PM2 for node.js, But whenever i am installing it gets stuck at the very start,I tried googling it but cant find anything related to my problem,I am on Windows 10,I cannot install any module!
I reinstalled my windows and thats it,No one was able to help except telling me to update npm which i did but didnt work.

Resources