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

Errors when using NgxSceneModule #50

Closed
wSedlacek opened this issue Sep 10, 2019 · 4 comments
Closed

Errors when using NgxSceneModule #50

wSedlacek opened this issue Sep 10, 2019 · 4 comments

Comments

@wSedlacek
Copy link

Describe the bug
When attempting to import NgxSceneModule there are a few issues noticed.

  1. Error at run time:
    Screen Shot 2019-09-09 at 20 03 56

  2. Error in VS Code
    Screen Shot 2019-09-09 at 20 01 49

To Reproduce
Steps to reproduce the behavior:

  1. ng new
  2. yarn add ngx-scenejs
  3. Add lines to app.module.ts:
import { NgxSceneModule } from 'ngx-scenejs';

@NgModule({
  imports: [
    NgxSceneModule
  ],
})
export class AppModule { }
  1. ng serve (Error Preset Template #1 will show in console)

  2. Enable VS Code extension Angular Language Service - https://marketplace.visualstudio.com/items?itemName=Angular.ng-template

  3. Add lines to app.component.html:

<ngx-scene></ngx-scene>
  1. Error Update scenejs version to react-scenejs #2 will show in VS Code

Expected behavior
When importing an Angular Module it shouldn't have errors at run time nor when using the Angular Lange Service.

Screenshots
(See Above)

Desktop (please complete the following information):

  • OS: macOS 10.13
  • Browser: Google Chrome 76
  • IDE: VS Code 1.38
  • Extensions: Angular Language Service 0.802.3

Additional context
I have tested with ngx-scenejs 1.1.0 and 1.0.1, from my test the behavior remains the sanme on both versions.

In your examples I have noticed that you have imported NgxSceneComponent directly into AppModule then added it to then declarations. While this does not have any errors at run time the Angular Language Service still produces error #2 and this does not match the way other Angular dependancies are imported.

I have also noticed that node_modules/ngx-scenejs/declaritions/ngx-scene.module.d.ts appears to be empty.

export declare class NgxSceneModule {
}
@daybrush
Copy link
Owner

I'm sorry. I'll check it.

Would you like to use it temporarily?

import { NgxSceneComponent, NgxSceneItemComponent } from "ngx-scenejs";


@NgModule({
  declarations: [
    NgxSceneComponent,
  ],
})

@wSedlacek
Copy link
Author

No worries at all! Thank you for getting back with me.

Using this temporarily solution does allow the code to run, however error #2 with the Angular Language Service extension still exist.

@daybrush
Copy link
Owner

@wSedlacek

ngx-scenejs 1.1.1 is released. Please check again.

Thank you

@wSedlacek
Copy link
Author

Great work it seems to be working now! Thank you very much for the quick fix.

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

No branches or pull requests

2 participants