Skip to content

ng new --mobile fails with peerDependencies not satisfied for angular2-universal #958

Closed

Description

@duergner

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/environment.dev.ts
  create config/environment.js
  create config/environment.prod.ts
  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

Activity

  1. added a commit that references this issue on May 30, 2016
    e2923a0
  2. filipesilva commented on May 30, 2016

    @filipesilva
    Contributor

    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.

  3. filipesilva commented on May 30, 2016

    @filipesilva
    Contributor

    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
  4. mackelito commented on Jun 3, 2016

    @mackelito

    Doing this and then ng serve ends up in "undefined" on http://localhost:4200/..
    The build works fine...

    angular-cli: 1.0.0-beta.5
    node: 6.0.0
    os: darwin x64

  5. drewsmith-uk commented on Jun 3, 2016

    @drewsmith-uk

    After doing what @filipesilva suggested, I am now getting the same result as @mackelito - when I ng serve my page on localhost:4200 just says "undefined".

    Version details:

    C:\PROJECTS\ngmob>ng -v
    (node:11108) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version.
    angular-cli: 1.0.0-beta.5
    node: 6.2.0
    os: win32 x64
    
  6. mackelito commented on Jun 3, 2016

    @mackelito

    Not sure why but now it works for me...
    ng new test-site && cd test-site --mobile

  7. delight commented on Jun 3, 2016

    @delight

    @mackelito the last command you send would not create a mobile app, hence you don't use angular-universal !

    I can confirm the undefined result described before.

  8. mackelito commented on Jun 3, 2016

    @mackelito

    Ah.. My bad! 😬
    Problem is still there..!

  9. added a commit that references this issue on Jun 3, 2016
    4ad94c2
  10. added a commit that references this issue on Jun 3, 2016
    740805b
  11. delight commented on Jun 3, 2016

    @delight

    @filipesilva did you give it a test-spin ? because with the dep "angular2-universal":"0.101.5" it starts but as mentioned by @mackelito and @drewstiff the served page is displaying only:

    undefined

  12. self-assigned this
    on Jun 3, 2016
  13. 23 remaining items

  14. mackelito commented on Jun 20, 2016

    @mackelito

    Well.. any kind of change breaks it hehe..
    Even changing from
    `


    {{title}}

    ` to `

    {{title}}

    `

    Edit: Just opening and saving the file without changes breaks Broccoli

  15. filipesilva commented on Jun 20, 2016

    @filipesilva
    Contributor

    @mackelito I tried changing something simple like the whitespaces or adding some text on app.component.html, and the build still worked (no build errors) - but the browser app is showing the old content. I think's cache busting or the service worker problem.

    Changing app.component.ts works though.

    This issue won't be closed anyway, the problem is still there, it's just alleviated.

  16. mackelito commented on Jun 20, 2016

    @mackelito

    hmmm.. strange that I don´t get the same problem as you!.. oh well.. I guess I´ll just have to wait :)

  17. ZloiBubr commented on Jun 22, 2016

    @ZloiBubr

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

  18. MarkPieszak commented on Jun 23, 2016

    @MarkPieszak
    Contributor

    @filipesilva I fixed The peerDependencies issue w Universal PR angular/universal#449, but still trying to look into what's causing nothing to render.

  19. manuelfink commented on Jun 23, 2016

    @manuelfink

    can confirm the problem

    angular-cli: 1.0.0-beta.6
    node: 6.0.0
    os: darwin x64

    updating the angular universal version to latest 0.101.9 makes it npm installable. however running ng serve ends in an ton of errors in console and only show undefined in the browser.

  20. filipesilva commented on Jul 27, 2016

    @filipesilva
    Contributor

    Issue made obsolete by #1455. In addition to normal upgrade steps for webpack, I'd like to add that main-app-shell.ts was changed a LOT. Full control of dependencies was also passed onto the generated project so you should be able to update them yourself for whatever is needed.

    See https://github.com/angular/angular-cli/blob/master/addon/ng2/blueprints/mobile/files/__path__/main-app-shell.ts for an example. The important bit is the getBootloader() and serialize functions, those are all the build system picks up.

    I should add a comment there to explain it tbh... Also see angular/universal#464.

    Let me know if you're still experiencing problems on the upcoming webpack release.

  21. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  22. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0Issue that causes an outage, breakage, or major function to be unusable, with no known workaroundseffort2: medium (days)type: bug/fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions