How to update angular-material2 using npm properly - angularjs

I am using angular material2 in my angular project.
This is the entry in package.json under dependencies
"#angular/material": "^2.0.0-beta.1",
I tried the following command
npm update #angular/material
but this ends with some errors
+-- #angular/material#2.0.0-beta.2
`-- UNMET PEER DEPENDENCY rxjs#5.0.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.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"
x64"})
npm WARN ng2-md-datatable#1.0.14 requires a peer of rxjs#~5.0.2 but none was installed.
npm WARN ng2-md-datatable#1.0.15 requires a peer of rxjs#~5.0.2 but none was installed.
npm WARN adminwebapp#1.0.0 No repository field.
Even my UI got distorted. What is the proper way to update this?
Error in console
ORIGINAL EXCEPTION: md-input-container must contain an mdInput directive. Did you forget to add mdInput to the native input or textarea element?
ErrorHandler.handleError # :3002/node_modules/#angular/core/bundles/core.umd.js:3066
2017-03-08 17:18:29.656 :3002/node_modules/#angular/core/bundles/core.umd.js:3069 ORIGINAL STACKTRACE:
ErrorHandler.handleError # :3002/node_modules/#angular/core/bundles/core.umd.js:3069
2017-03-08 17:18:29.656 :3002/node_modules/#angular/core/bundles/core.umd.js:3070 Error
at MdInputContainerMissingMdInputError.ZoneAwareError (http://localhost:3002/node_modules/zone.js/dist/zone.js:958:33)
at MdInputContainerMissingMdInputError.MdError [as constructor] (http://localhost:3002/node_modules/#angular/material/bundles/material.umd.js:994:16)
at new MdInputContainerMissingMdInputError (http://localhost:3002/node_modules/#angular/material/bundles/material.umd.js:11238:16)
at MdInputContainer.ngAfterContentInit (http://localhost:3002/node_modules/#angular/material/bundles/material.umd.js:11544:19)
at CompiledTemplate.proxyViewClass.View_Toolbar0.detectChangesInternal (/AppModule/Toolbar/component.ngfactory.js:168:75)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12208:18)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12355:48)
at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12193:22)
at CompiledTemplate.proxyViewClass.View_SideNav0.detectChangesInternal (/AppModule/SideNav/component.ngfactory.js:892:20)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12208:18)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12355:48)
at CompiledTemplate.proxyViewClass.AppView.internalDetectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12193:22)
at CompiledTemplate.proxyViewClass.View_AppComponent0.detectChangesInternal (/AppModule/AppComponent/component.ngfactory.js:51:19)
at CompiledTemplate.proxyViewClass.AppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12208:18)
at CompiledTemplate.proxyViewClass.DebugAppView.detectChanges (http://localhost:3002/node_modules/#angular/core/bundles/core.umd.js:12355:48)

Related

React Native Error: react-native#0.41.2 requires a peer of react#~15.4.0

I get below error when trying to npm install on this project: https://github.com/datso/react-native-pjsip-app
tar: .libs.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
npm WARN react-native#0.41.2 requires a peer of react#~15.4.0 but none is installed. You must install peer dependencies yourself.
I can't figure out how to install React Native, the project is one year old and I guess I must somehow update to latest version?
Following guide from http://www.cnblogs.com/mmx8861/p/9150009.html I did:
n
pm cache clean
Modified package.json with: "react":"~15.4.1"; "react-native":"0.42.3"; "react-test-renderer":"15.4.1"
npm install all module
npm install
npm i react-native-maps#0.12.5 --S
react-native link react-native-maps
Manually changing to React16 results in :
npm WARN enzyme#2.9.1 requires a peer of react#0.13.x || 0.14.x || ^15.0.0-0 || 15.x but none is installed. You must install peer dependencies yourself.
npm WARN react-dom#15.6.2 requires a peer of react#^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Then I changed "enzyme": "^2.9.1" to "enzyme": "^3.0.0" and "react-dom": "^15.6.0" to "react-dom": "^15.6.0" and now I'm stuck at below:
npm WARN react-addons-perf#15.4.2 requires a peer of react-dom#^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-addons-test-utils#15.6.2 requires a peer of react-dom#^15.4.2 but none is installed. You must install peer dependencies yourself.
npm WARN react-dom#15.6.2 requires a peer of react#^15.6.2 but none is installed. You must install peer dependencies yourself.
npm WARN The package react is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
It seems according to React the support for react-addons-perf is discontinued as of React 16 !
How do I fix the npm install errors?
Cheers

How to run Kotlin + React + Redux using the create-react-kotlin-app?

I am using the create-react-kotlin-app and following the instructions on its GitHub page to create a React + Redux app using Kotlin. The first install part works fine:
create-react-kotlin-app my-app
cd my-app
npm start
The app works fine, but when I try to add Redux:
npm install #jetbrains/kotlin-react-redux
npm WARN #jetbrains/kotlin-extensions#1.0.1-pre.49 requires a peer of core-js#^2.5.7 but none is installed. You must install peer dependencies yourself.
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.
npm WARN css-loader#1.0.0 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN url-loader#1.1.1 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN #jetbrains/kotlin-react-redux#5.0.7-pre.49 requires a peer of #jetbrains/kotlin-redux#^4.0.0-pre.49 but none is installed. You must install peer dependencies yourself.
npm WARN #jetbrains/kotlin-react-redux#5.0.7-pre.49 requires a peer of react-redux#^5.0.7 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
+ #jetbrains/kotlin-react-redux#5.0.7-pre.49
added 1 package from 1 contributor and audited 5522 packages in 9.891s
found 0 vulnerabilities
Redux doesn't work. How do I fix this? (I am running npm 6.1.0).
Hi #divlan Have you tried working through officail Hands-on on Kotlin React App?

react native error fsevents#1.2.4 (node_modules\fsevents

Hello I am getting these error after installing react native-naviation component
I am using EXPO for instead of NVD. More important is to resolve bold warning(last two warning)
npm WARN eslint-plugin-react-native#3.2.1 requires a peer of eslint#^3.17.0 || ^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN native-base#2.7.2 requires a peer of react#>=16.4.1 but none is installed. You must install peer dependencies yourself.
npm WARN native-base#2.7.2 requires a peer of react-native#>=0.56.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-maps#0.21.0 requires a peer of react-native#^0.51 || ^0.52 || ^0.53 || ^0.54 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.0-alpha.3 requires a peer of react#16.0.0-alpha.6 but none is installed. You must install peer dependencies yourself.
npm WARN react-native-reanimated#1.0.0-alpha.3 requires a peer of react-native#^0.44.1 but none is installed. You must install peer dependencies yourself.
**npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#1.2.4 (node_modules\fsevents):**
**npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})**
None of these errors are anything to worry about. Infact, they are not errors but a warnings.
eslint code quality checking software. It simply checks your code to see if it is adhering to the best standards. You could turn off that warning if you wished.
fsevents is an optional dependency. This error comes up (usually) if you are using npm on mac systems. It should have no effect on your build though. If you're particularly upset about those last two errors, run npm i -f to force a fetch of remote resources (which should get rid of that dependency issue).

I cannot install simle-react-dropdown

I am trying to install react-simple-dropdown by typing the following command in GitBash in the project directory:
npm i react-simple-dropdown
When I run that I get the below errors:
$ npm i react-simple-dropdown
lease-tracker#0.1.0 C:\Lease_Tracker
+-- UNMET PEER DEPENDENCY react#16.2.0
+-- UNMET PEER DEPENDENCY react-dom#16.2.0
`-- react-simple-dropdown#3.2.0
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.2.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents#^1.1.3 (node_modules\react-scripts\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents#1.2.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN react-simple-dropdown#3.2.0 requires a peer of react#0.14.x || 15.x but none was installed.
npm WARN react-simple-dropdown#3.2.0 requires a peer of react-dom#0.14.x || 15.x but none was installed.
npm WARN simple-react-dropdown#3.3.0 requires a peer of react#^15.3.1 but none was installed.
npm WARN simple-react-dropdown#3.3.0 requires a peer of react-dom#^15.3.1 but none was installed.
Could you please help me out with this?
Thanks,
Emir Kobaslic
These are just warnings not 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