Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transpiling failed with Ionic 2 : Cannot find name 'Router'. #65

Closed
badis opened this issue Dec 9, 2016 · 3 comments
Closed

Transpiling failed with Ionic 2 : Cannot find name 'Router'. #65

badis opened this issue Dec 9, 2016 · 3 comments

Comments

@badis
Copy link

badis commented Dec 9, 2016

Hello,

I am unable to setup this module with ionic 2 ( 2.1.14 ) which is based on angular 2 ( 2.1.1) .
I am having the following error.

Thank you for you time and consideration.

[16:04:13] ionic-app-scripts 0.0.45
[16:04:13] watch started ...
[16:04:13] build dev started ...
[16:04:13] clean started ...
[16:04:13] clean finished in 63 ms
[16:04:13] copy started ...
[16:04:13] transpile started ...
[16:04:18] typescript: node_modules/ng2-page-scroll/src/ng2-page-scroll.directive.d.ts, line: 18
Cannot find name 'Router'.

  L17:  private document;
  L18:  constructor(pageScrollService: PageScrollService, router: Router, document: any);
  L19:  ngOnDestroy(): any;

[16:04:18] transpile failed
[16:04:18] watch ready in 5.27 s
Running live reload server: http://192.168.1.2:35729
Watching: www//*, !www/lib//, !www/**/.map
√ Running dev server: http://192.168.1.2:8100

@Nolanus
Copy link
Owner

Nolanus commented Dec 9, 2016

Sounds like it's related to #40
Not using the Directive or importing the angular router are possible workarounds.

@badis
Copy link
Author

badis commented Dec 9, 2016

I think there is conflict between packages.

npm install ng2-page-scroll --save

give me the following errors :

ionic-hello-world@0.0.0 /home/badis/Desktop/PRX
├── UNMET PEER DEPENDENCY @angular/common@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/compiler@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/compiler-cli@2.2.1 invalid
├── UNMET DEPENDENCY @angular/core@2.1.1
├── UNMET PEER DEPENDENCY @angular/forms@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/http@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/platform-browser@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/platform-browser-dynamic@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/platform-server@2.2.1 invalid
├── UNMET PEER DEPENDENCY @angular/router@~3.2.0
├── ng2-page-scroll@4.0.0-beta.1
└── UNMET PEER DEPENDENCY rxjs@5.0.0-rc.5

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.15: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm WARN @angular/core@2.2.1 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN @angular/http@2.2.1 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/common@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/compiler@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/compiler-cli@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/core@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/forms@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/http@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/platform-browser@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/platform-browser-dynamic@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of @angular/platform-server@2.1.1 but none was installed.
npm WARN ionic-angular@2.0.0-rc.3 requires a peer of rxjs@5.0.0-beta.12 but none was installed.
npm WARN ng2-page-scroll@4.0.0-beta.1 requires a peer of @angular/router@~3.2.0 but none was installed.

@Nolanus Nolanus mentioned this issue Feb 25, 2017
@Nolanus Nolanus closed this as completed Apr 29, 2017
@Nolanus
Copy link
Owner

Nolanus commented Apr 29, 2017

Closed, as the cause lies in the dependency on angular router, which is tracked in the above referenced ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants