Repository navigation
ng new --mobile fails with peerDependencies not satisfied for angular2-universal #958
Copy link
Copy link
Closed
Labels
P0Issue that causes an outage, breakage, or major function to be unusable, with no known workaroundsIssue that causes an outage, breakage, or major function to be unusable, with no known workaroundseffort2: medium (days)type: bug/fix
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P0Issue that causes an outage, breakage, or major function to be unusable, with no known workaroundsIssue that causes an outage, breakage, or major function to be unusable, with no known workaroundseffort2: medium (days)type: bug/fix
Activity
fix(mobile): lock dependency
filipesilva commentedon May 30, 2016
Yeah it seems that a dependency of
angular2-universalhas a peerDependency on itself, but with a difference version. I put up a PR that addresses that.filipesilva commentedon May 30, 2016
Meanwhile, while a new CLI version that that change isn't included, you can do the following:
angular2-univeralversion to0.101.5inpackage.jsonmackelito commentedon Jun 3, 2016
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
drewsmith-uk commentedon Jun 3, 2016
After doing what @filipesilva suggested, I am now getting the same result as @mackelito - when I
ng servemy page on localhost:4200 just says "undefined".Version details:
mackelito commentedon Jun 3, 2016
Not sure why but now it works for me...
ng new test-site && cd test-site --mobiledelight commentedon Jun 3, 2016
@mackelito the last command you send would not create a mobile app, hence you don't use angular-universal !
I can confirm the
undefinedresult described before.mackelito commentedon Jun 3, 2016
Ah.. My bad! 😬
Problem is still there..!
fix(mobile): lock dependency
fix(mobile): lock dependency (#961)
delight commentedon Jun 3, 2016
@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:
undefined23 remaining items
fix(mobile): partially fix dep problem
mackelito commentedon Jun 20, 2016
Well.. any kind of change breaks it hehe..
Even changing from
`
` to `{{title}}
{{title}}
`Edit: Just opening and saving the file without changes breaks Broccoli
filipesilva commentedon Jun 20, 2016
@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.tsworks though.This issue won't be closed anyway, the problem is still there, it's just alleviated.
fix(mobile): partially fix dep problem
mackelito commentedon Jun 20, 2016
hmmm.. strange that I don´t get the same problem as you!.. oh well.. I guess I´ll just have to wait :)
fix(mobile): partially fix dep problem (#1151)
ZloiBubr commentedon Jun 22, 2016
Having same issue on mac + node 6 + last angular-cli. workaround does not work. the only way to use it now without --mobile option.
MarkPieszak commentedon Jun 23, 2016
@filipesilva I fixed The peerDependencies issue w Universal PR angular/universal#449, but still trying to look into what's causing nothing to render.
manuelfink commentedon Jun 23, 2016
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.
fix(mobile): partially fix dep problem (angular#1151)
fix(mobile): partially fix dep problem (angular#1151)
filipesilva commentedon Jul 27, 2016
Issue made obsolete by #1455. In addition to normal upgrade steps for webpack, I'd like to add that
main-app-shell.tswas 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()andserializefunctions, 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
webpackrelease.angular-automatic-lock-bot commentedon Sep 7, 2019
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.