I am new to these command and following a book to start Angular.js
npm install –g grunt-cli
npm install –g bower
npm install –g generator-angular
all commands are successfully run then I am creating a folder in C:\StockDog and running the command "yo angular StockDog" but it throws the error that yo command is not recognized. I added the path to PATH variable in MyComputer Environmental variable %AppData%\npm but same error yo command is not found.Please suggest why i am getting this error
You need to install Yeoman (npm install -g yo) to run Yeoman generators such as generator-angular - they won't work on their own.
Related
I have tried different option to install node latest version in ubuntu 16, it was always taking node 4,
I have followed link
and now node -v gives me 8.X than I have installed npm after that I am trying to install angular, its breaking error is in screen shot attachment
I know it required npm 5.5.1 but how do I install that, I have used command
npm install -g npm#latest
,
when I run command ng new myapp1 it gives error
This command can not be run inside of a CLI project.
it didn't work finally, what can I do next
Use These command for Install Angular Cli & Create Angular Project
npm install -g #angular/cli
ng new my-dream-app
cd my-dream-app
ng serve
And if you want to install latest Node check this
Note Use Sudo before NPM commands if you not have directory permissions.
I need to setup the web server for Angular.js application using Nodejs. Accordingly I installed node.js version 6.11.0 in the path: C:\Program Files\nodejs
Next step is to install module of nodejs using the command:
npm install deployd -g
I am installing it in a path where my node_modules are installed.
When I run the command: npm install deployd –g I get one warning message (please see image for reference)
enter image description here
So I get to know that deployd is installed in the path C:\Program\node_modules\deployd.
Now if I run dpd –V command, it shows that dpd is not recognized as an internal or external command.
Can anybody please help me installing deployd?
I think this could help. It's worked for me.
npm install deployd-cli -g
I am trying to use the ng-factory generator to scaffold a new project to build an angularjs component. After the project has been created with the yo ng-factory command, I tried to run it using the gulp serve task but found the following error:
c:\projects\bywebclient>gulp serve
[11:20:51] Loading C:\projects\bywebclient\gulp_tasks\browsersync.js
[11:20:52] Loading C:\projects\bywebclient\gulp_tasks\karma.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\misc.js
[11:20:57] Loading C:\projects\bywebclient\gulp_tasks\webpack.js
[11:21:07] Using gulpfile c:\projects\bywebclient\gulpfile.js
C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129
gulpInst.start.apply(gulpInst, toRun);
^
TypeError: Cannot read property 'apply' of undefined
at C:\Users\ATUL KALE\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js:129:
19
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
at Module.runMain (module.js:577:11)
at run (bootstrap_node.js:352:7)
at startup (bootstrap_node.js:144:9)
at bootstrap_node.js:467:3
Am I missing something? I already tried to run again the npm install
Thanks,
Atul Kale
Try to reinstall gulp-cli :
npm install -g gulp-cli
npm install -g gulp-cli
And important: after running that command, open a new terminal so it'll take effect.
Upgrade to 4.0 like this:
npm install --save-dev github:gulpjs/gulp#4.0
Uninstall the global gulp installation and local gulp-cli installation. While keeping global gulp-cli and local gulp packages.
npm uninstall -g gulp
npm uninstall -g gulp-cli
npm install -g gulp-cli
npm install --save-dev github:gulpjs/gulp#4.0
I get below error everytime i run
npm install gulp -g --save
TypeError: Cannot read property 'apply' of undefined
at /usr/local/lib/node_modules/gulp/bin/gulp.js:129:20
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickDomainCallback (internal/process/next_tick.js:219:9)
I tried:
npm i -g gulp-cli
and it works for me.
If again i run
npm install gulp -g --save
the above error returns. I noted when i first installed Gulp it was saved in my package.json but now it's absent.
I tried uninstalling both gulp and gulp-cli from my machine (locally and globally), but after uninstall gulp -v, it still showed Gulp CLI 3.9.1, even in new terminal window.
In the end, these are the steps that finally worked for me (seems like CLI simply got cached hard):
Navigate to your project and delete node_modules folder.
Run following:
npm uninstall gulp --global
npm uninstall gulp-cli --global
apt-get remove npm
apt-get remove nodejs
apt-get install nodejs
apt-get install npm
npm install --global gulp-cli
Navigate to your project and run:
npm install
Close current terminal, open new one and check for success:
gulp -v
Should say CLI version 2.1.0 (as of time of writing).
Now you can run your gulp tasks without that error :)
In my case, I had an automated script which was doing npm install gulp (...) and until v3.9x it was fine.
After some time, that naive install would pick v4.0.0, which breaks my CI.
Changing the script to do npm install gulp#3.9.1 reverted things back to normal.
Reinstall gulp and gulp-cli, to install the last version.
npm uninstall -g gulp
npm uninstall -g gulp-cli
npm install -g gulp-cli
npm install -g gulp
And then, close the terminal and open new.
*This command no longer works: npm install --save-dev github:gulpjs/gulp#4.0
trying to build my angular app by calling grunt but receiving this error:
Warning: Task "build" not found. Use --force to continue.
Using the force option does not work. I tried to run :
npm install grunt --save-dev
This did not help either?
Did you install the grunt-cli from NPM? It's the command line interface for Grunt to run.
$ npm install -g grunt-cli
Trying to just startup a simple angular app via Yeoman, using steps in this guide
http://www.sitepoint.com/kickstart-your-angularjs-development-with-yeoman-grunt-and-bower/
and get this error when trying to run grunt or grunt server:
Loading "Gruntfile.js" tasks...ERROR
Error: Cannot find module 'load-grunt-tasks'
Warning: Task "default" not found. Use --force to continue.
Here are my versions:
yo --version && grunt --version && bower --version
1.1.2<
grunt-cli v0.1.13
grunt v0.4.4
1.3.1
See screencast of this in action:
http://screencast.com/t/4ToPw3SlL2
I just encountered the same problem today, managed to resolve it with the answers here.
Basically I needed to update npm to latest version,
by using this command (the npm which came with Node-v0.10.29 package was outdated)
npm update npm -g
or
sudo npm update npm -g (i used this command on my mac)
Then type this command
npm --version (it should show 1.5.0-alpha-4 or later version)
Then type the grunt serve command
grunt serve
If you still have issues, then try running these commands
npm install
or
sudo npm install (i used this command on my mac)
Then try grunt serve command again,
grunt serve
This time, it worked for me.
If it didn't, then try this command
bower install (i did not have to use this command)
Run the following commands from the directory that has the Gruntfile.js for your project:
npm install
npm install -g bower
bower install
This will install all npm and bower based dependencies for your project.
In the screencast at 1:18 it shows install errors tied to at least multimatch. load-grunt-taskis dependent on multimatch.
Installed "load-grunt-tasks" module locally
ie
npm install load-grunt-tasks
instead of
npm install -g load-grunt-tasks