Unmet Peer Dependency kendo-angular-grid#1.8.0 with rxjs#5.5.5 - kendo-ui-angular2

I'm getting
npm ERR! peer dep missing: rxjs#^5 <5.5, required by
#progress/kendo-angular-grid#1.8.0. It's weird that the lower version
of #progress/kendo-angular-grid#1.7.1 works ok with rxjs#5.5.5 with no
dependency error.

Have a look here: https://www.telerik.com/kendo-angular-ui/components/grid/changelog/ you need to use the 2.0 version of the grid if you want to use rxjs >= 5.5

Related

Multiple versions of same peerDependency required

When I run npm i on my current react project, I get the following warning regarding react peerDependency:
npm WARN react-tap-event-plugin#3.0.3 requires a peer of react#^16.0.0-0 < 16.4.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-paginate#4.4.4 requires a peer of react#^15.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN formsy-react#0.19.5 requires a peer of react#^0.14.0 || ^15.0.0 but none is installed. You must install peer dependencies yourself.
While in my package.json, I am using latest version of react:
"react": "^16.7.0"
I am new to node and npm. I would like to know what is the good practice for installing npm peerDependencies:
1.) Can the warnings for lower versions be ignored if updated version is already specified in package.json.
2.) As per
https://lexi-lambda.github.io/blog/2016/08/24/understanding-the-npm-dependency-model/
and
https://github.com/npm/npm/issues/6565
npm provides dependency isolation and peerDepencies needs to be manually installed, so should I install all 3 versions of react but I fear that will break the import statements.
3.) If none of the above two, which version should I use in package.json.
P.S. there are many more dependencies in my package.json which might require latest version also.
Taking Danyal's answer further, you can upgrade formsy-react and remove react-tap-event-plugin:
Update formsy-react to latest version: (1.1.5 at time of writing), the latest version of this package supports react ^16.
react-tap-event-plugin supports react version upto version 16.4. You have a few options here:
Downgrade react: downgrading to 16.4 will remove all the warnings, but will restrict your ability to upgrade in the future
Remove react-tap-event-plugin: According to the documentation https://www.npmjs.com/package/react-tap-event-plugin. This module is actually deprecated thanks to fixes made to later browsers. Check the blog post for info.
Fork react-tap-event-plugin: I wouldn't do this myself, but you could fork the plugin and publish it yourself with the updated react peerDependency.
A peer dependency means that a package is applicable to used with a particular version of the dependency & wouldn't work as intended if you exceed the specified version.
In your case react-tap-event-plugin#3.0.3 requires a version of React less than 16.4.0, react-paginate#4.4.4 requires any version of React 15 and the same for formsy-react#0.19.5.
You would need to downgrade from React 16.7.0, but that can break your application if you are using 16.7.0 features, or you could remove the packages and use another one or write the package's logic from start yourself.
Tip: always make sure to read package dependencies on npm website before actually considering to use a package for your project.

React Starter Kit Reports Unexplained Missing Packages

Let me start by stating that I am a rank beginner with respect to React/JS, but far from a beginner overall; my experience is varied, and includes, among many other things, some work with Angular/JS. Hence, this is not my first exposure to the Node/JS ecosystem.
The current investigation began with a missing peer report that I received when I installed the Material_UI package into the directory into which I had just installed the React Starter Kit, which gave the following report.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...
> uglifyjs-webpack-plugin#0.4.6 postinstall F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo\node_modules\uglifyjs-webpack-plugin
> node lib/post_install.js
+ react-scripts#1.1.2
+ react#16.3.0
+ react-dom#16.3.0
added 1327 packages in 86.861s
Success! Created material_ui_table_demo at F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo
Inside that directory, you can run several commands: ...
Installing Material_UI elicited the following report.
npm install material-ui#next
> jss#9.8.1 postinstall F:\Praesidium\Armatus_Admin_EventRegistration\React\material_ui_table_demo\node_modules\jss
> node -e "console.log('\u001b[35m\u001b[1mLove JSS? You can now support us on open collective:\u001b[22m\u001b[39m\n > \u001b[34mhttps://opencollective.com/jss/donate\u001b[0m')"
Love JSS? You can now support us on open collective:
> https://opencollective.com/jss/donate
npm WARN ajv-keywords#3.1.0 requires a peer of ajv#^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
+ material-ui#1.0.0-beta.40
added 47 packages in 23.878s
After investigating the AJV package, I decided to generate a dependency tree from the starter kit. The dependency tree reported one peer dependency, on the aforementioned AJV package, which went unreported by the installer.
More puzzling, however, is the list of allegedly missing packages reported by npm list.
material_ui_table_demo_Packages_Skeleton_20180402_211705.TXT is the npm list report covering the React Starter Kit.
material_ui_table_demo_Packages_Skeleton_20180402_211705_STDOUT.TXT is the list of missing packages, which were reported on the terminal console.
Since it affects the dependency tree, it is important that you are aware that this installation is on Microsoft Windows 10 Professional, and that the installed NPM and Node versions are 5.6.0 and v8.10.0, respectively.
The React Starter Kit Installation Instructions are dead silent about unresolved dependencies that a developer must address. Which report do I believe, the dependency tree or the missing packages reported separately by the very same npm list?
The issue of not installing packages on the first npm install has been popping up up here in there.
Running npm install again for a second time usually solves the problem, but in some cases (like this) you have to force a package version by doing the following steps:
Delete the node_modules folder
Delete the package-lock.json
Add the exact dependency to the package.json (in our case ajv#^6.0.0)
Execute npm update (just in case)
Execute npm install
Now the pm ERR! peer dep missing: ajv#^6.0.0, required by ajv-keywords#3.1.0 is no longer!
Note: how to add the dependency:
...
"dependencies": {
"ajv": "^6.0.0",
...
Why? Its a bug with the dependency system of npm (they added a hacky solution at some point and then they removed it, they have said they will rewrite the whole dependency system at some point)

redux-form-material-ui#4.3.3 requires a peer of material-ui#^0.19.0 || 1 but none is installed.

I'm getting this error after npm install: redux-form-material-ui#4.3.3 requires a peer of material-ui#^0.19.0 || 1 but none is installed. You must install peer dependencies yourself.
How do I resolve this?
The error message is pretty self-explanatory. That particular module has a peerDependency, that is - It requires another module to function properly but it does not require it directly.
You can read more about peerDependencies here
To solve your problem simply install the dependencies it indicates. In your case:
npm install --save material-ui
or, if you want version 1 (although it's still in beta and may not be suitable for production):
npm install --save material-ui#next
You should do this: $ npm i ajv
Or you can do this: $npm install -S ajv#^6.0.0
It will work. I just have tried.

Updating to nodejs 4x MEAN stack

So I've been using node v 0.10x and 0.12x for dev and prod environments.
Now we need to upgrade to v4x and as I'm doing so, I'm finding that is not so easy, gcc compiler issues, deprecated libs...
Here are some of the messages I'm getting
I was able to overcome the c++11 problems
Updating to Node.js 4
Node on old distributions
Now what I would like is to have the builds as clean as possible,
as well as to know what is the impact of having this deprecated libraries in the project in the short/long term,
is it possible to completely get rid of them? if so is there a kind of best practices approach for this?
For instance I updated lodash#1.0.2 to version 4 in the main package.json file just to find/get more deprecated libraries like a nested deprecated libraries, so is it really possible to get rid of this deprecated libraries?
If you are migrating from v0.1 to v.0.2, you need create a node link between the local and the global modules.
About the warnings,
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents#1.0.8
Don-t be afraid about the after update all the packages, some packages are marked as deprecated but the doesn't have any update available, then if you tried update them, don't worry, that doesn't affect your project.
And releated with the last of your issues:
UNMET PEER DEPENDENCY kerberos#~0.0
First one you need update your kerberos development package:
apt-get install libkrb5-dev
And running the command:
npm install --save kerberos mongod
If that doesn't fix your issue, you could try in a manual way intall all the packages with:
git clone https://github.com/christkv/kerberos.git
cd kerberos
npm install
npm install -g node-gyp
cd ~/JesusTheProject
npm install mongodb --save
npm --loglevel verbose install mongodb

Why does npm sometimes use a different version from elsewhere in the dependency tree rather than install a required module?

I'm well aware npm dependencies are tree shaped, and that two different modules can load two different versions of a dependency at the same time.
So when I see an npm error like:
npm WARN unmet dependency /somedir/node_modules/gulp-browserify
/node_modules/browserify/node_modules/module-deps
requires stream-combiner#'~0.1.0' but will load /somedir/node_modules
/gulp-browserify/node_modules/browserify/node_modules/stream-combiner,
which is version 0.0.4
Why doesn't npm install the module-deps dependency (stream-combiner#'~0.1.0') underneath module_deps/node_modules/stream-combiner?
Or, more generally: why does npm sometimes not install a module where it is needed, using a different version on that module from elsewhere in the dependency tree instead?

Resources