NODEMON not launching although node is updated and NPM is initialized - node.js

Since 3 days ago my nodemon wasn't able to launch from every single project folder. When trying to launch it, it displays this:
$ nodemon app.js
C:\Users\asus\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found
Note that I have have updated my node to the latest version and npm was initalized. This really is blocking my developement so any help would be very much appreciated.

nodemon install globally and try
npm install -g nodemon

Related

Why npx create-react-app is showing "the project was bootstrapped with an old unsupported version of tools"?

I recently switched to Ubuntu, whenever I create react app it's giving me this note, and the app it's creating is a class component.
ankit#gram:~/Documents/Development/React/react-project$ npx create-react-app my-app
Creating a new React app in /home/ankit/Documents/Development/React/react-project/my-app.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
added 987 packages in 39s
22 packages are looking for funding
run `npm fund` for details
Success! Created my-app at /home/ankit/Documents/Development/React/react-project/my-app
Inside that directory, you can run several commands:
npm start
Starts the development server.
npm run build
Bundles the app into static files for production.
npm test
Starts the test runner.
npm run eject
Removes this tool and copies build dependencies, configuration files
and scripts into the app directory. If you do this, you can’t go back!
We suggest that you begin by typing:
cd my-app
npm start
Happy hacking!
Note: the project was bootstrapped with an old unsupported version of tools.
Please update to Node >=14 and npm >=6 to get supported tools in new projects.
my node version: v16.14.0
my npm version:8.3.1
I think this was because npx was not installed in my system, when I created a react app by this command create-react-app the app created was fine. I also installed npx using this command npm install -g npx and created a react app and everything was fine. before this make sure you have installed create-react-app in your system if not then install it by using this command
sudo npm install -g create-react-app
I am a new programmer had this issue not long ago I just solved it.
Use sudo apt install nodejs
It will automatically install version 10 for you which doesn't accept React.
Then you try to install NVM package, use it to update your node to a newer version.
You can check me on GitHub bari racha Wuye
I was having the same problem after I had just installed Ubuntu 22.04.
The fix for me was updating node and npm by following these instructions free code camp update node and npm
Specifically, I followed the instructions under the heading "1. Use NPM to Update Your Node Version", to update node and ignored the 2nd and 3rd headings, then followed the instructions under the last heading to update npm
afterwards I restarted my computer, opened the project directory and ran the command
npm i create-react-app#latest
then I ran
npx create-react-app projectname
and it worked as expected

`npx create-react-app` says it requires "Node 14 or higher" but I'm running 17.4.0. How can I fix this?

I'm trying to start a new React project on my Mac (running Mojave 10.14.5).
In VS Code's Terminal I ran npx create-react-app my-app and got a message saying that my version of Node was out of date. I updated node to version 17.4.0 and ran it again - still got the same message.
I then ran clear cache: npm cache clean --force and tried again - still no luck.
node -v says I'm running 17.4.0.
Would anyone know what I could do?
The first thing you need to do is to uninstall the create-react-app and then npm install it again.
You can use these commands for uninstalling the create-react-app:
if you are using NPM:
npm uninstall -g create-react-app
if you are using Yarn:
yarn global remove create-react-app
for creating new app you can use the following command:
npx create-react-app#latest your-project-name
You must notice that the create-react-app should not be installed globally as it is documented in Create-React-app Docs.
Also please note that it is safe to say, always use the LTS version of node (that is 16.13.2 at this time).
It should solve your problem with initiating a new react app.

Nodemon command not found issue

I recently update my node.js version and npm and now I am getting a error:
$ nodemon
C:\Users\username\AppData\Roaming\npm/node_modules/node/bin/node: line 1: This: command not found;
I have tried uninstalling and reinstalling, I am pretty new to using nodemon and node. I have searched the previous questions and tried updating my Path variables but so far nothing has worked.
Have you installed nodemon globally or just installed it ? If not , try npm install -g nodemon to install it globally.
If uninstalling and then reinstalling of nodemon module did not work, please try npx nodemon script.js . I tried it in my VS Code Git Bash terminal and found it working.

Npm commands downloaded but not recognize

So I recently update node js pretty much since I was gonna try Angular but now when I try to run any command like create-react-app appname I start to get this.
C:\Users\Mine\AppData\Roaming\npm/node_modules/node/bin/node: line 1:
This: command not found
now I checked my Environmental variables and on top of my Path folder I have
C:\Users\Mine\AppData\Roaming\npm which im pretty sure is the correct
path.
I've tried to change the path to programfiles\node and it did not work as well.
i think you should after update node js uninstall create-react-app
npm uninstall create-react-app
npm uninstall -g create-react-app
npm cache clean --force
at the next
npm install -g create-react-app
Once installation successful, try running
npx create-react-app hello-world
Note
npx on the first line is not a typo — it’s a package runner tool that
comes with npm 5.2+.

Angular2 boilerplate npm-start not working

I am new to Angular2 and trying to setup the environment with the boilerplate code https://github.com/mschwarzmueller/angular-2-beta-boilerplate.
My dependencies installed fine with npm install but when I run npm start I start to get the below statements. I don't think its an error but its hard to figure out as to what it really means.
$ npm start
> angular2-boilerplate#1.0.0 start C:\Users\user\desktop\angboiler\angular-2-beta-boilerplate
> concurrent "npm run gulp" "npm run lite"
I tried installing run lite, concurrently separately but that didn't work. I even ran npm update -g && npm install -g concurrently lite-server typescript
to make sure i have stuffs updated to make it work but still no progress.
I have: typescript 1.8 version node 4.4.5 version running.
Alternatively, perhaps you would be interested in using Angular CLI, which seems to be the official boilerplate for Angular 2.

Resources