Trouble during generator-angular installation with npm - angularjs

I ran those commands
AT07684S#ZE0PW0NM /d/AAA_Dev2015
$ npm install -g generator-karma --save
npm WARN deprecated lodash#2.4.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^3.0.0.
C:\Users\AT07684S\AppData\Roaming\npm
└── generator-karma#1.0.1
AT07684S#ZE0PW0NM /d/AAA_Dev2015
$ npm install -g generator-angular --save
npm WARN deprecated lodash#2.4.2: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^3.0.0.
npm WARN deprecated CSSselect#0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat#0.4.7: the module is now available as 'css-what'
npm WARN deprecated lodash#2.1.0: lodash#<3.0.0 is no longer maintained. Upgrade to lodash#^3.0.0.
C:\Users\AT07684S\AppData\Roaming\npm
├── generator-angular#0.14.0
└── UNMET PEER DEPENDENCY generator-karma#>=0.9.0
npm WARN EPEERINVALID generator-angular#0.14.0 requires a peer of generator-karma#>=0.9.0 but none was install
ed.
As you can see I first installed generator-karma 1.0.1 but then when I install generator-angular it fails, supposedly because generator-karma>=0.9.0 is not installed.
What could I do?
Thanks

Similar question has already been answered here npm install -g generator-angular gives error (requires a peer of) and here UNMET PEER DEPENDENCY generator-karma#>=0.9.0. Wise people suggest to install everything in one line, so try this:
sudo npm install -g grunt-cli bower yo generator-karma generator-angular
Works for me, it should help You as well.

Related

React-webcam not getting added to my react project

I did the following to install react-webcam,
sudo npm install -g --save react-webcam
npm WARN react-webcam#3.0.1 requires a peer of react#>=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-webcam#3.0.1 requires a peer of react-dom#>=15.3.0 but none is installed. You must install peer dependencies yourself.
+ react-webcam#3.0.1
added 1 package from 1 contributor in 0.351s
but it wasnt added to the dependencies in package.json, So how can I add it to the node modules?

Installing material-ui showing warning: $ npm install #material-ui/core npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0

I am installing material-ui: npm install #material-ui/core (which is the latest version) for React.
I got the latest npm version (npm i -g npm, which is now + npm#6.1.0).
And I also have tried: npm install --save material-ui.
But it always keeps showing me this:
$ npm install #material-ui/core
npm WARN ajv-keywords#3.2.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
#material-ui/core#1.2.1
updated 1 package and audited 14597 packages in 8.235s
found 0 vulnerabilities.
I don't know if this is a material-ui latest version problem? or it is the latest npm problem? So, how do I proceed to install the material-ui for React?
You need to install ajv#^6.0.0
npm install -S ajv#^6.0.0
Edit: to add to this, as described in this post, it seems that npm removed the automatic installation of peer dependencies on npm 3, but if you'd like that to be taken care of automatically, you can use npm-install-peers

Error Installing React

Whenever I do a npm init then npm install react - I get this error
── UNMET PEER DEPENDENCY react#15.3.0
npm WARN baobab-react#0.1.1 requires a peer of react#>=0.13.0 <1.0.0 but none was installed.
npm WARN fixed-data-table#0.4.7 requires a
peer of react#>=0.13.0 <0.15.0 || ^0.14.0-beta3 but none was
installed.
npm WARN react-native#0.30.0 requires a peer of
react#~15.2.0 but none was installed.
npm WARN react-router#0.13.5
requires a peer of react#0.13.x||0.14.x but none was installed. npm
ERR! code 1
This is my node v6.3.0 annd npm 3.10.3 versions.
npm install react --no-optional
Inside your project directory, can you please first run the following commands:-
1) rm -rf node_modules
2) Try installig react again now and other packages which are in your package.json file.

npm modules wont get installed

I was trying to install dependencies which resulted in this warning:
npm WARN angular2-in-memory-web-api#0.0.12 requires a peer of #angular/core#2.0.0-rc.2 but none was installed.
npm WARN angular2-in-memory-web-api#0.0.12 requires a peer of #angular/http#2.0.0-rc.2 but none was installed.
I then tried to manually install #angular/core#2.0.0-rc.2 so i used:
npm install -g #angular/core#2.0.0-rc.2
Which also resulted in
npm WARN #angular/core#2.0.0-rc.2 requires a peer of rxjs#5.0.0-beta.6 but none was installed.
npm WARN #angular/core#2.0.0-rc.2 requires a peer of zone.js#^0.6.6 but none was installed.
I then used
npm install -g rxjs#5.0.0-beta.6
npm install -g zone.js#^0.6.6
Which threw no warning. I then proceed to again install #angular/core#2.0.0-rc.2, but it threw same warning as before, like those two modules weren't installed at all. Has anyone met similliar problem?
What is causing this? I am trying to wrap my mind about it but can't find a solution, is there a way how to fix it?
Thanks for help.

Successful yeoman generator install can't be found when running yo?

Currently failing to learn how to use terminal as a development tool.
Trying to set up the MEAN stack by using yeoman to scaffold the project. However, when I run npm install -g generator-angular-fullstack it installs successfully here (/Users/xxxx/npm/lib/node_modules) and then when I run yo angular-fullstack it says I haven't got that generator.
I have two generators installed already but the new generator (angular-fullstack) isn't adding to the list even though the global install was successful:
mean
meanjs
This might be irrelevant but when I try and uninstall these generators I get this message - npm WARN uninstall not installed in /Users/xxxx/npm/lib/node_modules
What I'm trying to do is:
1. install the angular-fullstack generator
2. scaffold a project using angular-fullstack
I've tried uninstalling yeoman, npm, clearing npm cache and all sorts of things but I can't get it to work. I've been working on this on and off for about 3 weeks now and all I want to do is get a mean project structure set up and running. So if anyone can help that'd be great.
Being a rookie I didn't want to resort to Stack Overflow, but I'll take the abuse now. ;)
Thanks in advance.
UPDATE: Tried to install a different generator (angular) and can't access this either. This is the message I get when installing.
~:TestMVCApp xxxx$ npm install -g generator-angular
npm WARN peerDependencies The peer dependency generator-karma#>=0.9.0 included from generator-angular will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
npm WARN deprecated CSSselect#0.4.1: the module is now available as 'css-select'
npm WARN deprecated CSSwhat#0.4.7: the module is now available as 'css-what'
npm WARN peerDependencies The peer dependency yo#>=1.0.0 included from generator-karma will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
generator-karma#1.0.0 /Users/xxxx/npm/lib/node_modules/generator-karma
├── sorted-object#1.0.0
├── underscore#1.8.3
└── yeoman-generator#0.19.2 (detect-conflict#1.0.0, read-chunk#1.0.1, diff#1.4.0, yeoman-welcome#1.0.1, xdg-basedir#1.0.1, user-home#1.1.1, rimraf#2.4.3, async#0.9.2, mime#1.3.4, text-table#0.2.0, class-extend#0.1.2, dargs#4.0.1, shelljs#0.4.0, debug#2.2.0, nopt#3.0.4, istextorbinary#1.0.2, cross-spawn#0.2.9, mkdirp#0.5.1, chalk#1.1.1, yeoman-assert#1.0.0, cli-table#0.3.1, run-async#0.1.0, mem-fs-editor#1.2.3, through2#0.6.5, underscore.string#3.2.2, glob#5.0.15, findup-sync#0.2.1, yeoman-environment#1.2.7, sinon#1.17.1, github-username#1.1.1, dateformat#1.0.11, pretty-bytes#1.0.4, gruntfile-editor#1.0.0, lodash#3.10.1, inquirer#0.8.5, html-wiring#1.2.0, download#4.4.0)
generator-angular#0.12.1 /Users/xxxx/npm/lib/node_modules/generator-angular
├── chalk#1.1.1 (escape-string-regexp#1.0.3, ansi-styles#2.1.0, supports-color#2.0.0, strip-ansi#3.0.0, has-ansi#2.0.0)
├── yosay#1.0.5 (ansi-regex#1.1.1, ansi-styles#2.1.0, word-wrap#1.1.0, strip-ansi#2.0.1, pad-component#0.0.1, minimist#1.2.0, taketalk#1.0.0, string-width#1.0.1, repeating#1.1.3)
├── wiredep#2.2.2 (propprop#0.3.0, minimist#1.2.0, lodash#2.4.2, chalk#0.5.1, through2#0.6.5, glob#4.5.3, bower-config#0.5.2)
└── yeoman-generator#0.16.0 (diff#1.0.8, dargs#0.1.0, isbinaryfile#2.0.4, debug#0.7.4, async#0.2.10, mime#1.2.11, rimraf#2.2.8, findup-sync#0.1.3, text-table#0.2.0, mkdirp#0.3.5, lodash#2.4.2, iconv-lite#0.2.11, underscore.string#2.3.3, shelljs#0.2.6, class-extend#0.1.2, chalk#0.4.0, glob#3.2.11, file-utils#0.1.5, cheerio#0.13.1, request#2.30.0, inquirer#0.4.1, download#0.1.19)
First, you'll need to install globally yeoman and these required tools:
npm install -g yo bower grunt-cli gulp

Resources