How to resolve this gulp watch issue [duplicate] - node.js

I am trying to start my angular app using grunt serve command
but I am getting Fatal error: spawn cmd ENOENT.
I used following commands to generate my Angular App
npm install -g yo grunt-cli bower
npm install -g generator-angular
yo angular
npm install
bower install
then i used grunt serve command to start my app
but its not working.
System Info:
OS: Windows 7 64 bit
npm version : 2.11.3
please help me, I gone through all the grunt documentation but no clue.

Try the following possible solutions:
Verify the npm folder exists at the following location C:\Users\My-UserName\AppData\Roaming\npm
Try to run npm cache clean
Add C:\Windows\System32\ to the PATH Environment variable

Run grunt serve with cmd.exe instead of git bash. I have the same problem and have dealt with it in this way.

Related

ng: command not found after installing node and angular cli

I just got a new clean MacOS Catalina installation, and I was trying to get my old project running using ng serve but it tells me that 'ng: command not found' I installed the npm 6.12.1 through nodeJS 12.13.1 installation as well, and ran 'npm install -g #angular/cli' and both ran without issues, then ran the npm i command for the stuff included in package.json in the same project directory, I googled around and one comment suggested using npm link #angular/cli which didn't differ as well
Try to restart your terminal after running npm install -g #angular/cli
Add npm global modules folder to your $PATH variable with the following command
export PATH="$HOME/.npm-packages/bin:$PATH"

Can't run Angular application with ng serve

enter image description here
Hi.
I can't build and run my Angular application. I tried to reinstall angular/cli, node.js and remove all node modules packages globally but it did not help.
try to do:
npm install
if the error persist you can do
npm install jquery --save
If the error still happens after npm install, try deleting the whole node_modules folder and run npm install again.

angular cli install command showing errors

npm install -g #angular/cli
I am trying to install angular cli on Windows 10, I have already installed npm and node, and have verified their version, they are above then what is required for angular cli to install but when I run install command on the prompt it show error.
i have uninstalled npm and node, then reinstalled them, and tried again to install and it worked :) thanks
first try to see node and npm is installed successfully using following commands on cmd
node -v
for node and it will return the version of node,then
npm -v
then it will return the version of npm after that in windows go to environment variables and see node environmental varible is there. after that
npm cache clean --force
use to clean the cache and go to users/Appdata/roaming and delete all the node modules in npm cache folder and restart your computer and give the following command.
npm install -g #angular/cli

Grunt is not recognised : windows7 64-bit

I have installed npm and installed grunt, but when i run grunt, it says 'grunt' is not recognized as an internal or external command.
I done the below steps in command prompt
npm install
npm install -g grunt-cli
PATH variable and grunt folder are available but still i am not able to run grunt.
Please provide me a solution for this
You have only installed the command line interface.
Use npm install -g grunt to install the actual program.

installing grunt locally as under privileged user

I'm using node/grunt for deploying to a shared hosting server.
I have node installed in $HOME/opt/node
I don't know where npm install -g grunt is going to install it to, or how to tell npm to install global files to $HOME/some/path.
I ran npm install grunt -g and it seemed to work, but I cannot find the grunt binary anywhere.
If you want the grunt command in your server's shell, you'll need to install the Grunt CLI.
npm install grunt-cli -g
Global modules are located here:
/usr/local/lib/node_modules

Resources