generator-backbone not install properly - backbone.js

error :
+-- UNMET PEER DEPENDENCY generator-backbone-mocha#>=0.0.2
`-- UNMET PEER DEPENDENCY generator-mocha#>=0.1.3
npm WARN generator-backbone#0.4.0 requires a peer of generator-mocha#>=0.1.3 but none was installed.
npm WARN generator-backbone#0.4.0 requires a peer of generator-backbone-mocha#>=0.0.2 but none was installed.

UNMET PEER DEPENDENCY error means that your dependency (in this case generator-backbone) requires that you explicitly install also something else (in this case, generator-mocha and generator-backbone-mocha). You should just install those dependencies (top level):
npm install generator-backbone#0.4.0 --save
npm install generator-backbone-mocha --save

Related

Webpack install throws an error UNMET PEER DEPENDENCY webpack#4.6.0 invalid

I am trying to compile an old project. npm install -D webpack earlier complained of webpack-cli install issue. Now if I try with the latest one npm i -D webpack#4.6.0, it is giving following error.
└── UNMET PEER DEPENDENCY webpack#4.6.0 invalid
npm WARN babel-loader#6.4.1 requires a peer of webpack#1 || 2 || ^2.1.0-beta || ^2.2.0-rc but none was installed.
npm WARN webpack-dev-middleware#1.12.2 requires a peer of webpack#^1.0.0 || ^2.0.0 || ^3.0.0 but none was installed.
npm WARN webpack-dev-server#1.16.5 requires a peer of webpack#>=1.3.0 <3 but none was installed.
npm WARN react-tutorials#0.0.0 No repository field.
npm ERR! code 1

React-bootstrap not installing

I'm having issue installing react and react-bootstrap. I used them in the past and everything was working fine. But now, I seem to have an issue installing or updating them.
After the code line: npm install --save react-bootstrap in my terminal, I get these errors:
npm WARN react-bootstrap#0.32.1 requires a peer of react#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-bootstrap#0.32.1 requires a peer of react-dom#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-prop-types#0.4.0 requires a peer of react#>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group#2.2.1 requires a peer of react#>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-transition-group#2.2.1 requires a peer of react-dom#>=15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays#0.8.3 requires a peer of react#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-overlays#0.8.3 requires a peer of react-dom#^0.14.9 || >=15.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN prop-types-extra#1.0.1 requires a peer of react#>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN uncontrollable#4.1.0 requires a peer of react#>=0.11.0 but none is installed. You must install peer dependencies yourself.
Even my past react projects aren't working anymore and I can't find in the docs anything about these errors.
Thank you for any help.
I suspect there's an typo in your command line
npm install --save react-booTstrap

NPM transitive dependencies do not work for Angular [duplicate]

For example, when I install Angular2:
npm install --save angular2
temp#1.0.0 /Users/doug/Projects/dougludlow/temp
├── angular2#2.0.0-beta.3
├── UNMET PEER DEPENDENCY es6-promise#^3.0.2
├── UNMET PEER DEPENDENCY es6-shim#^0.33.3
├── UNMET PEER DEPENDENCY reflect-metadata#0.1.2
├── UNMET PEER DEPENDENCY rxjs#5.0.0-beta.0
└── UNMET PEER DEPENDENCY zone.js#0.5.11
npm WARN angular2#2.0.0-beta.3 requires a peer of es6-promise#^3.0.2 but none was installed.
npm WARN angular2#2.0.0-beta.3 requires a peer of es6-shim#^0.33.3 but none was installed.
npm WARN angular2#2.0.0-beta.3 requires a peer of reflect-metadata#0.1.2 but none was installed.
npm WARN angular2#2.0.0-beta.3 requires a peer of rxjs#5.0.0-beta.0 but none was installed.
npm WARN angular2#2.0.0-beta.3 requires a peer of zone.js#0.5.11 but none was installed.
Is there a magic flag that I can pass to npm that will install the peer dependencies as well? I haven't been able to find one... It's tedious to manually copy and paste the peer dependencies and make sure I have the correct versions.
In other words, I'd rather not have to do:
npm install --save angular2#2.0.0-beta.3 es6-promise#^3.0.2 es6-shim#^0.33.3 reflect-metadata#0.1.2 rxjs#5.0.0-beta.0 zone.js#0.5.11
What is the better way?
npm version 7 and newer
npm v7 has reintroduced the automatic peerDependencies installation. Now in V7, as in versions before V3, you only need to do an npm i and all peerDependences should be automatically installed.
They had made some changes to fix old problems as version compatibility across multiple dependants.
You can see the discussion and the announcement.
Older Answer
The automatic install of peer dependencies was explicitly removed with npm 3, as it cause more problems than it tried to solve. You can read about it here for example:
https://blog.npmjs.org/post/110924823920/npm-weekly-5
https://github.com/npm/npm/releases/tag/v3.0.0
So no, for the reasons given, you cannot install them automatically with npm 3 upwards.
I solved it by rewriting package.json with the exact values warnings were about.
Warnings when running npm:
npm WARN angular2#2.0.0-beta.3 requires a peer of es6-shim#^0.33.3 but none was installed.
npm WARN angular2#2.0.0-beta.3 requires a peer of reflect-metadata#0.1.2
In package.json, write
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
Then, delete node_modules directory.
Finally, run the command below:
npm install
Cheat code helpful in this scenario and some others...
├── UNMET PEER DEPENDENCY #angular/common#4.0.2
├── UNMET PEER DEPENDENCY #angular/compiler#4.0.2
├── UNMET PEER DEPENDENCY #angular/compiler-cli#4.0.2
├── UNMET PEER DEPENDENCY #angular/core#4.0.2
├── UNMET PEER DEPENDENCY #angular/forms#4.0.2
├── UNMET PEER DEPENDENCY #angular/http#4.0.2
├── UNMET PEER DEPENDENCY #angular/platform-browser#4.0.2
├── UNMET PEER DEPENDENCY #angular/platform-browser-dynamic#4.0.2 >
copy & paste your error into your code editor.
Highlight an unwanted part with your curser. In this case ├── UNMET PEER DEPENDENCY
Press command + d a bunch of times.
Press delete twice. (Press space if you accidentally highlighted ├── UNMET PEER DEPENDENCY )
Press up once. Add npm install
Press down once. Add --save
Copy your stuff back into the cli and run
npm install #angular/common#4.0.2 #angular/compiler#4.0.2 #angular/compiler-cli#4.0.2 #angular/core#4.0.2 #angular/forms#4.0.2 #angular/http#4.0.2 #angular/platform-browser#4.0.2 #angular/platform-browser-dynamic#4.0.2 --save
I experienced these errors when I was developing an npm package that had peerDependencies. I had to ensure that any peerDependencies were also listed as devDependencies. The project would not automatically use the globally installed packages.
The project npm-install-peers will detect peers and install them.
As of v1.0.1 it doesn't support writing back to the package.json automatically, which would essentially solve our need here.
Please add your support to issue in flight: https://github.com/spatie/npm-install-peers/issues/4
I was facing the same issue, lucky I found an alternative way to install peer dependencies along with the install command.
Step 1: $ npm i npm-install-peers -D
for more clarity about the plugin: https://www.npmjs.com/package/npm-install-peers
Step 2: Update package.json for magical script
....
"scripts": {
...
"postinstall": "npm-install-peers"
},
....
Step 3: Just need to hit the install command to get installed all plugins
$ npm install
Install yarn and then run:
yarn global add install-peerdeps

Problems installing grunt: Multiple dependency issues

I keep getting all of these warnings and dependency issues when trying to install grunt locally using npm install grunt --save-dev.
PS C:\atomworkspace\angularProject\conFusion> npm install grunt --save-dev
conFusion# C:\atomworkspace\angularProject\conFusion
+-- UNMET PEER DEPENDENCY grunt#1.0.1
+-- UNMET PEER DEPENDENCY grunt-contrib-clean#1.0.0 extraneous
+-- UNMET PEER DEPENDENCY grunt-contrib-coffee#~0.10.0
+-- UNMET PEER DEPENDENCY grunt-contrib-compass#~0.7.0
+-- UNMET PEER DEPENDENCY grunt-contrib-compress#~0.8.0
+-- UNMET PEER DEPENDENCY grunt-contrib-concat#~0.4.0
+-- UNMET PEER DEPENDENCY grunt-contrib-connect#~0.7.0
+-- UNMET PEER DEPENDENCY grunt-contrib-copy#~0.5.0
+-- UNMET PEER DEPENDENCY grunt-contrib-csslint#~0.2.0
+-- UNMET PEER DEPENDENCY grunt-contrib-cssmin#~0.9.0
+-- UNMET PEER DEPENDENCY grunt-contrib-handlebars#~0.8.0
+-- UNMET PEER DEPENDENCY grunt-contrib-htmlmin#~0.2.0
+-- UNMET PEER DEPENDENCY grunt-contrib-imagemin#~0.7.0
+-- UNMET PEER DEPENDENCY grunt-contrib-jade#~0.11.0
+-- UNMET PEER DEPENDENCY grunt-contrib-jasmine#~0.6.0
+-- UNMET PEER DEPENDENCY grunt-contrib-jshint#1.1.0 extraneous
+-- UNMET PEER DEPENDENCY grunt-contrib-jst#~0.6.0
+-- UNMET PEER DEPENDENCY grunt-contrib-less#~0.11.0
+-- UNMET PEER DEPENDENCY grunt-contrib-nodeunit#~0.3.0
+-- UNMET PEER DEPENDENCY grunt-contrib-qunit#~0.4.0
+-- UNMET PEER DEPENDENCY grunt-contrib-requirejs#~0.4.1
+-- UNMET PEER DEPENDENCY grunt-contrib-sass#~0.7.0
+-- UNMET PEER DEPENDENCY grunt-contrib-stylus#~0.15.1
+-- UNMET PEER DEPENDENCY grunt-contrib-symlink#~0.3.0
+-- UNMET PEER DEPENDENCY grunt-contrib-uglify#~0.4.0
+-- UNMET PEER DEPENDENCY grunt-contrib-watch#~0.6.0
`-- UNMET PEER DEPENDENCY grunt-contrib-yuidoc#~0.5.0
npm WARN grunt-contrib#0.11.0 requires a peer of grunt#~0.4.4 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-clean#~0.5.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-coffee#~0.10.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-compass#~0.7.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-compress#~0.8.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-concat#~0.4.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-connect#~0.7.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-copy#~0.5.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-csslint#~0.2.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-cssmin#~0.9.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-handlebars#~0.8.0 but none was installe
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-htmlmin#~0.2.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-imagemin#~0.7.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-jade#~0.11.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-jasmine#~0.6.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-jshint#~0.10.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-jst#~0.6.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-less#~0.11.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-nodeunit#~0.3.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-qunit#~0.4.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-requirejs#~0.4.1 but none was installed
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-sass#~0.7.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-stylus#~0.15.1 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-symlink#~0.3.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-uglify#~0.4.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-watch#~0.6.0 but none was installed.
npm WARN grunt-contrib#0.11.0 requires a peer of grunt-contrib-yuidoc#~0.5.0 but none was installed.
PS C:\atomworkspace\angularProject\conFusion>
Here's my package.json:
{
"name": "conFusion",
"private": true,
"devDependencies": { "grunt": "^1.0.1" },
"engines": { "node": ">=0.10.0" }
}
Try installing grunt globally npm install -g grunt-cli
Downgrade npm version to 6.x. It should fix the issue. npm v7 throws these kind of errors.

Error when trying npm install tslint and rxjs

I've tried npm install tslint and npm install rxjs, both run after npm cache clean and with #latest in the end. Every time I keep getting "UNMET PEER DEPENDECY rxjs#5.0.3" and "UNMET PEER DEPENDENCY tslint#4.3.1".
The entire failure stack is
[jannik#jannik-dimsen app (AngularApp *)]$ npm install
first-app#0.0.0 /home/jannik/angular2apps/first-app
├── UNMET PEER DEPENDENCY rxjs#5.0.3
└── UNMET PEER DEPENDENCY tslint#4.3.1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.0.17: wanted {"os":"darwin","
arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN #angular/core#2.2.3 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN #angular/http#2.2.3 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN #angular/router#3.2.3 requires a peer of rxjs#5.0.0-beta.12 but none was installed.
npm WARN codelyzer#2.0.0-beta.3 requires a peer of tslint#~4.0.0 but none was installed.
npm WARN tslint-loader#2.1.5 requires a peer of tslint#^3.0.0 but none was installed.
npm ERR! code 1
Some sites suggested running npm cache clean but that didn't fix my problem, and I can't figure out why I can't install those npm modules. I've added them to the package.json file as well and tried a npm install giving the same error

Resources