angular-cli: ng new --mobile fails with peerDependencies not satisfied for angular2-universal

MacOSX El Capitan

$ ng -v
angular-cli: 1.0.0-beta.5
node: 4.4.5
os: darwin x64

Very clean install, fresh OS, fresh Node (from pkg install)

$ ng new --mobile NAME
installing ng2
  create .clang-format
  create .editorconfig
  create src/app/NAME.component.spec.ts
  create src/app/NAME.component.ts
  create src/app/environment.ts
  create src/app/index.ts
  create src/app/shared/index.ts
  create src/favicon.ico
  create src/index.html
  create src/main.ts
  create src/system-config.ts
  create src/tsconfig.json
  create src/typings.d.ts
  create angular-cli-build.js
  create angular-cli.json
  create config/
  create config/environment.js
  create config/
  create config/karma-test-shim.js
  create config/karma.conf.js
  create config/protractor.conf.js
  create e2e/app.e2e.ts
  create e2e/app.po.ts
  create e2e/tsconfig.json
  create e2e/typings.d.ts
  create .gitignore
  create package.json
  create public/.npmignore
  create tslint.json
  create typings.json
installing mobile
  create src/icons/android-chrome-144x144.png
  create src/icons/android-chrome-192x192.png
  create src/icons/android-chrome-36x36.png
  create src/icons/android-chrome-48x48.png
  create src/icons/android-chrome-72x72.png
  create src/icons/android-chrome-96x96.png
  create src/icons/apple-touch-icon-114x114.png
  create src/icons/apple-touch-icon-120x120.png
  create src/icons/apple-touch-icon-144x144.png
  create src/icons/apple-touch-icon-152x152.png
  create src/icons/apple-touch-icon-180x180.png
  create src/icons/apple-touch-icon-57x57.png
  create src/icons/apple-touch-icon-60x60.png
  create src/icons/apple-touch-icon-72x72.png
  create src/icons/apple-touch-icon-76x76.png
  create src/icons/apple-touch-icon-precomposed.png
  create src/icons/apple-touch-icon.png
  create src/icons/favicon-16x16.png
  create src/icons/favicon-32x32.png
  create src/icons/favicon-96x96.png
  create src/icons/icon.png
  create src/icons/mstile-144x144.png
  create src/icons/mstile-150x150.png
  create src/icons/mstile-310x150.png
  create src/icons/mstile-310x310.png
  create src/icons/mstile-70x70.png
  create src/icons/safari-pinned-tab.svg
  create src/main-app-shell.ts
  create src/manifest.webapp
  create src/system-import.js
Successfully initialized git.
⠇ Installing packages for tooling via npm
├── es6-shim (ambient)
├── node (ambient)
├── angular-protractor (ambient dev)
├── jasmine (ambient dev)
└── selenium-webdriver (ambient dev)

The package angular2-universal@0.100.5 does not satisfy its siblings' peerDependencies requirements!
Error: The package angular2-universal@0.100.5 does not satisfy its siblings' peerDependencies requirements!
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/lib/install.js:125:32
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/lib/install.js:268:7
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/read-installed/read-installed.js:142:5
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/read-installed/read-installed.js:263:14
    at cb (/usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/slide/lib/async-map.js:47:24)
    at /usr/local/lib/node_modules/angular-cli/node_modules/angular-cli/node_modules/npm/node_modules/read-installed/read-installed.js:263:14

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 3
  • Comments: 34 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Meanwhile, while a new CLI version that that change isn’t included, you can do the following:

  • ng new --mobile NAME --skip-npm
  • cd NAME
  • change the angular2-univeral version to 0.101.5 in package.json
  • npm install

@tvsijin +1 on that, I’ve been waiting for about a week to hear news of this issue being solved.

I’m under the impression that we can’t make --mobile web apps until it is solved. Is this true, or is there some work around that allows us to start building with the --mobile flag boilerplate?

I’m supposed to be building a web app for a friend’s business, but I’m stuck between using Angular Mobile or making an Ionic 2 app and just running it in the browser…

I was hoping that this issue would be resolved soon, because I’m already proficient in Angular, and would much rather use Angular Mobile than have to learn Ionic 2 in a short amount of time.

Having same issue on mac + node 6 + last angular-cli. workaround does not work. the only way to use it now without --mobile option.

I had some success going back to 1.0.0-beta.4. ng new still failed with a similar error, however a subsequent npm install seems to have given me a working app despite warnings about unmet peer dependencies. I’m not getting undefined in the index like i was with 1.0.0-beta.5 after making filipesilva’s suggestion.

same problem here. after running ng serve the dist/index.html actually only contains the string “undefined” instead of the html code. so it may be some build step?

Yeah it seems that a dependency of angular2-universal has a peerDependency on itself, but with a difference version. I put up a PR that addresses that.