0

I am using angular2seed-advanced Check here. And i follow the steps mantioned in that. while developing app i give npm start i got the http://localhost:5555/ and it correctly dispalyed on browser. after that when i give the command that which is for android

ie, npm run start.

android i got an error Unable to install dependencies. Make sure your package.json is valid and all dependencies are correct. Error is: The package @angular/core@2.1.0-beta.0 does not satisfy its siblings' peerDependencies requirements!. while running npm install command i got

UNMET PEER DEPENDENCY @angular/common@2.1.0-beta.0
+-- UNMET PEER DEPENDENCY @angular/compiler@2.1.0-beta.0
+-- UNMET PEER DEPENDENCY @angular/core@2.1.0-beta.0
+-- UNMET PEER DEPENDENCY @angular/http@2.1.0-beta.0
+-- UNMET PEER DEPENDENCY @angular/platform-browser@2.1.0-beta.0

what should i do? anyone please provide solution for this. here i attached my package.json file

package.json

"devDependencies": {
"@angular/compiler-cli": "^0.6.1",
"@angular/platform-server": "^2.0.0",
"@angular/tsc-wrapped": "^0.3.0",
"@types/async": "^2.0.31",
"@types/browser-sync": "^0.0.32",
"@types/connect-livereload": "^0.5.29",
"@types/core-js": "^0.9.32",
"@types/express": "^4.0.32",
"@types/gulp": "^3.8.31",
"@types/gulp-load-plugins": "^0.0.27",
"@types/gulp-protractor": "^1.0.28",
"@types/gulp-sass": "^0.0.28",
"@types/gulp-shell": "^0.0.28",
"@types/gulp-util": "^3.0.28",
"@types/jasmine": "^2.2.33",
"@types/lodash": "^4.14.36",
"@types/node": "^6.0.38",
"@types/protractor": "^1.5.18",
"@types/rimraf": "^0.0.27",
"@types/run-sequence": "^0.0.27",
"@types/selenium-webdriver": "2.44.*",
"@types/systemjs": "^0.19.30",
"@types/yargs": "^0.0.30",
"@types/zone.js": "^0.0.26",
"async": "^2.0.1",
"autoprefixer": "^6.3.7",
"browser-sync": "^2.13.0",
"codelyzer": "1.0.0-beta.0",
"colorguard": "^1.2.0",
"compression": "^1.6.2",
"connect": "^3.4.1",
"connect-history-api-fallback": "^1.3.0",
"connect-livereload": "^0.5.4",
"cssnano": "^3.7.3",
"deep-extend": "^0.4.1",
"doiuse": "^2.4.1",
"electron-connect": "^0.4.2",
"electron-debug": "^1.0.0",
"electron-prebuilt": "^1.2.1",
"event-stream": "^3.3.3",
"express": "~4.14.0",
"express-history-api-fallback": "^2.0.0",
"extend": "^3.0.0",
"gulp": "^3.9.1",
"gulp-atom-electron": "^1.6.1",
"gulp-cached": "^1.1.0",
"gulp-clean-css": "^2.0.11",
"gulp-concat": "^2.6.0",
"gulp-concat-css": "^2.3.0",
"gulp-filter": "^4.0.0",
"gulp-inject": "^4.1.0",
"gulp-inline-ng2-template": "^3.0.1",
"gulp-load-plugins": "^1.2.4",
"gulp-newer": "^1.2.0",
"gulp-plumber": "~1.1.0",
"gulp-postcss": "^6.1.1",
"gulp-progeny": "^0.3.1",
"gulp-protractor": "^2.4.0",
"gulp-replace": "^0.5.4",
"gulp-sass": "^2.3.2",
"gulp-sass-lint": "^1.2.0",
"gulp-sourcemaps": "2.0.0-alpha",
"gulp-symdest": "^1.0.0",
"gulp-template": "^4.0.0",
"gulp-tslint": "^6.0.1",
"gulp-typedoc": "^2.0.0",
"gulp-typescript": "^3.0.1",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7",
"gulp-watch": "^4.3.8",
"is-ci": "^1.0.9",
"isstream": "^0.1.2",
"jasmine-core": "~2.4.1",
"jasmine-spec-reporter": "^2.5.0",
"karma": "~0.13.22",
"karma-chrome-launcher": "~1.0.1",
"karma-coverage": "^1.1.0",
"karma-jasmine": "~1.0.2",
"karma-mocha-reporter": "^2.0.4",
"merge-stream": "^1.0.0",
"open": "0.0.5",
"postcss-reporter": "^1.4.1",
"protractor": "^3.3.0",
"remap-istanbul": "^0.6.4",
"rimraf": "^2.5.3",
"run-sequence": "^1.2.2",
"semver": "^5.3.0",
"serve-static": "^1.11.1",
"slash": "~1.0.0",
"stylelint": "^7.0.2",
"stylelint-config-standard": "^11.0.0",
"systemjs-builder": "0.15.31",
"tildify": "^1.2.0",
"traceur": "^0.0.111",
"ts-node": "^1.0.0",
"tslint": "^3.13.0",
"tslint-stylish": "2.1.0-beta",
"typedoc": "^0.4.5",
"typescript": "2.0.2",
"walk": "^2.3.9",
"yargs": "^4.8.0"
 },
"dependencies": {
"@angular/common": "^2.1.0-beta.0",
"@angular/compiler": "^2.1.0-beta.0",
"@angular/core": "^2.1.0-beta.0",
"@angular/forms": "^2.1.0-beta.0",
"@angular/http": "^2.1.0-beta.0",
"@angular/platform-browser": "^2.1.0-beta.0",
"@angular/platform-browser-dynamic": "^2.1.0-beta.0",
"@angular/router": "^3.1.0-beta.0",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^2.0.0",
"@ngrx/store": "^2.2.1",
"angulartics2": "^1.1.5",
"core-js": "^2.4.1",
"es-module-loader": "^1.0.0",
"lodash": "^4.15.0",
"ng2-translate": "^2.4.4",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.38",
"zone.js": "0.6.23"
}
}

nativescript/package.json

"dependencies": {
"@angular/common": "^2.1.0-beta.0",
"@angular/compiler": "^2.1.0-beta.0",
"@angular/core": "^2.1.0-beta.0",
"@angular/forms": "^2.1.0-beta.0",
"@angular/http": "^2.1.0-beta.0",
"@angular/platform-browser": "^2.1.0-beta.0",
"@angular/platform-browser-dynamic": "^2.1.0-beta.0",
"@angular/platform-server": "^2.1.0-beta.0",
"@angular/router": "^3.1.0-beta.0",
"@ngrx/core": "^1.2.0",
"@ngrx/effects": "^2.0.0",
"@ngrx/store": "^2.2.1",
"angulartics2": "^1.1.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.35.0",
"lodash": "^4.15.0",
"nativescript-angular": "next",
"nativescript-ng2-translate": "^1.2.0",
"nativescript-theme-core": "0.0.10",
"ng2-translate": "^2.4.4",
"parse5": "1.4.2",
"punycode": "1.3.2",
"querystring": "0.2.0",
"reflect-metadata": "^0.1.8",
"rxjs": "5.0.0-beta.12",
"tns-core-modules": "^2.3.0",
"url": "0.10.3"
 },
 "devDependencies": {
"zone.js": "^0.6.21",
"babel-traverse": "6.12.0",
"babel-types": "6.11.1",
"babylon": "6.8.4",
"filewalker": "0.1.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.3.2",
"shelljs": "^0.7.0",
"typescript": "^1.8.10"
}
Khushi
  • 1,759
  • 6
  • 26
  • 45

1 Answers1

0

Not in this version of angular-seed. But in previous versions I had same problems.

Fix was install zone.js and rxjs first.

  1. removing node_modules from root and nativescript folder
  2. install zone.js and rxjs
  3. tns install

something like this. Maybe installing order was off.

It maybe other dependency than zone.js and rxjs.

you can try npm -i @angular/common@2.1.0-beta.0 to see which dependencies are unmet

Hope this helps


UPDATE 1 After I tried cd nativescript && npm i command gave me following error.

npm WARN ng2-translate@2.5.0 requires a peer of @angular/core@~2.0.0 but none was installed.
npm WARN ng2-translate@2.5.0 requires a peer of @angular/http@~2.0.0 but none was installed.
npm WARN @ngrx/store@2.2.1 requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN @ngrx/effects@2.0.0 requires a peer of @angular/core@^2.0.0 but none was installed.

this means version 2.5.0 of plugin ng2-translate requires version ~2.0.0 of @angular/core. But version ~2.0.0 of @angular/core is not installed.

So downgrading few beta version in nativescript/package.json file fixed the problem run on my machine.

"@angular/common": "^2.0.0",
"@angular/compiler": "^2.0.0",
"@angular/core": "^2.0.0",
"@angular/forms": "^2.0.0",
"@angular/http": "^2.0.0",
"@angular/platform-browser": "^2.0.0",
"@angular/platform-browser-dynamic": "^2.0.0",
"@angular/platform-server": "^2.0.0",
"@angular/router": "^3.0.0",

I advice to ask developers directly on github or slack channel, or use stable release of that repo. Cheers.

matar
  • 137
  • 1
  • 12
  • Thanks for your quick reply. i follow your instructions. that is i install "zone.js": "^0.6.21" and "rxjs": "5.0.0-beta.12". after that applied tns install --path nativescript. the i got an error The package @angular/core@2.1.0-beta.0 does not satisfy its siblings' peerDependencies requirements!. – Khushi Oct 06 '16 at 09:03
  • also tried npm install @angular/common@2.1.0-beta.0 den the result is: +-- UNMET PEER DEPENDENCY @angular/common@2.1.0-beta.0 +-- UNMET PEER DEPENDENCY @angular/compiler@2.1.0-beta.0 +-- UNMET PEER DEPENDENCY @angular/core@2.1.0-beta.0 +-- UNMET PEER DEPENDENCY @angular/http@2.1.0-beta.0 `-- UNMET PEER DEPENDENCY @angular/platform-browser@2.1.0-beta.0 – Khushi Oct 06 '16 at 09:06
  • All i can tell is `cd nativescript` `rm -rf node_modules && npm i` displays which plugin has unmet dependency – matar Oct 07 '16 at 13:23
  • Updated the answer – matar Oct 07 '16 at 13:34
  • when i gave this command rm -rf node_modules && npm i i got UNMET PEER DEPENDENCY @angular/core@2.1.0-rc.0 and UNMET PEER DEPENDENCY @angular/http@2.1.0-rc.0 – Khushi Oct 10 '16 at 04:34