angular-cli: angular 2.1.0 release causes missing peer dependencies

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX + Windows 7

Versions.

Please run ng --version. If there’s nothing outputted, please run in a Terminal: node --version and paste the result here:

angular-cli: 1.0.0-beta.17
node: 6.7.0
os: darwin x64

Repro steps.

Was this an app that wasn’t created using the CLI? What change did you do on your code? etc.

ng init in empty directory, then npm ls

The log given by the failure.

Normally this include a stack trace and some more information.

[snip]
npm ERR! peer dep missing: @angular/common@2.1.0, required by @angular/platform-server@2.1.0
npm ERR! peer dep missing: @angular/compiler@2.1.0, required by @angular/platform-server@2.1.0
npm ERR! peer dep missing: @angular/core@2.1.0, required by @angular/platform-server@2.1.0
npm ERR! peer dep missing: @angular/platform-browser@2.1.0, required by @angular/platform-server@2.1.0
npm ERR! peer dep missing: @angular/platform-server@2.0.2, required by @angular/compiler-cli@0.6.4

Mention any other details that might be useful.

I would hope generated projects would have resolvable dependencies so that npm shrinkwrap works out of the box.

I imagine there’s a way to edit generated pom so that we can use use angular 2.1.0, I’m just not sure what it is…

package.json:

{
  "name": "ng-deps",
  "version": "0.0.0",
  "license": "MIT",
  "angular-cli": {},
  "scripts": {
    "start": "ng serve",
    "lint": "tslint \"src/**/*.ts\"",
    "test": "ng test",
    "pree2e": "webdriver-manager update",
    "e2e": "protractor"
  },
  "private": true,
  "dependencies": {
    "@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/router": "~3.0.0",
    "core-js": "^2.4.1",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.23"
  },
  "devDependencies": {
    "@types/jasmine": "^2.2.30",
    "@types/node": "^6.0.42",
    "angular-cli": "1.0.0-beta.17",
    "codelyzer": "~0.0.26",
    "jasmine-core": "2.4.1",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-jasmine": "^1.0.2",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "4.0.9",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "2.0.2"
  }
}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 22 (1 by maintainers)

Most upvoted comments

I think this is a possible duplicate for #1941 moreover the the last answer by @JohnMcGuinness fixed issues like this for me,

reposting it here for convenience

npm uninstall -g angular-cli
npm cache clean
npm install -g node-gyp
npm install -g node-pre-gyp
npm install -g angular-cli

These 5 steps successfully installed angular-cli@1.0.0-beta.15

i have something strange. my angular-cli versions : angular-cli: 1.0.0-beta.28.3 node: 6.9.4 os: win32 x64 @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/router: 3.0.0 @angular/compiler-cli: 0.6.1 @angular/platform-server: 2.0.0 @angular/tsc-wrapped: 0.3.0

and package file: “scripts”: { “build.dev”: “gulp build.dev --color --config-env dev”, “build.dev.watch”: “gulp build.dev.watch --color”, “build.e2e”: “gulp build.e2e --color”, “build.prod”: “gulp build.prod --color --config-env prod”, “build.prod.exp”: “gulp build.prod.exp --color --config-env prod”, “build.test”: “gulp build.test --color”, “test.watch”: “gulp test.watch --color”, “generate.manifest”: “gulp generate.manifest --color”, “e2e”: “protractor”, “e2e.live”: “protractor --elementExplorer”, “gulp”: “gulp”, “karma”: “karma”, “karma.start”: “karma start”, “postinstall”: “gulp check.versions && npm prune && gulp webdriver”, “reinstall”: “npm cache clean && npm install”, “serve.coverage”: “remap-istanbul -b src/ -i coverage/coverage-final.json -o coverage -t html && npm run gulp – serve.coverage --color”, “serve.dev”: “gulp serve.dev --color --config-env dev”, “serve.e2e”: “gulp serve.e2e --color”, “serve.prod”: “gulp serve.prod --color --config-env prod”, “start”: “gulp serve.dev --color”, “tasks.list”: “gulp --tasks-simple --color”, “test”: “gulp test --color”, “e2e.ci”: “gulp build.prod --color && gulp build.js.e2e --color && gulp e2e --color”, “tests.all”: “npm test && npm run e2e.ci”, “webdriver-start”: “webdriver-manager start”, “webdriver-update”: “webdriver-manager update” }, “author”: “Nitin Kumar Mishra”, “license”: “MIT”, “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/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”, “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-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-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-template”: “4.0.0”, “gulp-tslint”: “6.0.1”, “gulp-typescript”: “2.13.6”, “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”, “typescript”: “2.0.2”, “walk”: “2.3.9”, “yargs”: “4.8.0” }, “dependencies”: { “@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/router”: “3.0.0”, “angularfire2”: “^2.0.0-beta.7”, “core-js”: “2.4.0”, “es-module-loader”: “1.0.0”, “firebase”: “^3.6.9”, “font-awesome”: “4.6.3”, “highcharts”: “4.2.5”, “jquery”: “3.0.0”, “moment”: “2.15.0”, “ng2-bootstrap”: “1.1.5”, “reflect-metadata”: “0.1.8”, “rxjs”: “5.0.0-beta.12”, “systemjs”: “0.19.38”, “zone.js”: “0.6.23” } } on npm install: I got this : npm WARN angularfire2@2.0.0-beta.7 requires a peer of rxjs@^5.0.1 but none was installed. npm ERR! code 1

then i changed to rxjs@^5.0.1 i got this: npm WARN @angular/core@2.0.0 requires a peer of rxjs@5.0.0-beta.12 but none was installed. npm WARN @angular/http@2.0.0 requires a peer of rxjs@5.0.0-beta.12 but none was installed. npm WARN @angular/router@3.0.0 requires a peer of rxjs@5.0.0-beta.12 but none was installed.

what can i do?

your help will be appreciated!

Thanks

npm WARN @angular/core@2.4.8 requires a peer of rxjs@^5.0.1 but non e was installed. how i can solve

Installing globally the latest angular-cli (beta-18) solved this problem for me.

@JanStureNielsen - yes, the npm warnings are what we’re interested in, even though the project should work.

Does npm ls run successfully in your project?