CaliStyle / ng-intercom

Angular 7+ Wrapper for Intercom.com
MIT License
54 stars 46 forks source link

ng-intercom undefined #7

Closed otusweb closed 7 years ago

otusweb commented 7 years ago

Re-opeing issue #6 as I'm getting the same issue. I followed the instruction on he home page, I add the import in my module.ts file, then add ng-intercom to the list of imports and get this error:

ERROR in ./src/app/app.module.ts
Module not found: Error: Can't resolve 'ng-intercom' in '/Users/otusweb/Documents/tweetPresenter/tweetapp-web/src/app'
 @ ./src/app/app.module.ts 18:0-45
 @ ./src/main.ts
 @ multi ./src/main.ts

my app.module.ts file

// angular imports
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, ErrorHandler } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule, Http, RequestOptions } from '@angular/http';
import { provideAuth, AuthHttp, AuthConfig } from 'angular2-jwt';

// third party imports
import {NgbModule} from '@ng-bootstrap/ng-bootstrap';
import {InlineEditorModule} from 'ng2-inline-editor';
import {RollbarModule} from 'angular-rollbar/lib';
import { ProgressHttpModule } from "angular-progress-http";
import { IntercomModule } from 'ng-intercom';

[... other imports ]
@NgModule({
  declarations: [
      AppComponent,
      PresentationsComponent,
      PresentationDetailComponent,
      SlideDetailComponent,
      HomeComponent,
      NotFoundComponent,
      UploadProgressModalContent,
      BetaGateComponent
  ],
  imports: [ 
      BrowserModule,
      FormsModule,
      HttpModule,
      ProgressHttpModule,
      AppRoutingModule,
      InlineEditorModule,
      RollbarModule.forRoot({
        accessToken: 'xxxxx',
      }),
      NgbModule.forRoot(), 
    IntercomModule.forRoot()
  ],
  providers: [
    { provide: ErrorHandler, useClass: CustomErrorHandler },
    PresentationService,
    SlideService,
    UserService,
    Auth,
    {
      provide: AuthHttp,
      useFactory: authHttpServiceFactory,
      deps: [ Http, RequestOptions ]
    },
  AuthGuard,
  BetaGuard,
  LoggedOutGuard],
  entryComponents:
  [UploadProgressModalContent],
  bootstrap: [AppComponent]
})

export class AppModule { }

OS: mac OS 10.12


os: darwin x64
@angular/common: 4.0.2
@angular/compiler: 4.0.2
@angular/core: 4.0.2
@angular/forms: 4.0.2
@angular/http: 4.0.2
@angular/platform-browser: 4.0.2
@angular/platform-browser-dynamic: 4.0.2
@angular/router: 4.0.2
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.2```

npm view ng-intercom version
```0.2.1```
wbhob commented 7 years ago
  1. You published a live access token
  2. That error means the module is not installed, not that there is a compilation error. I'll try and take a look, but make sure it's properly installed first.

Wilson Hobbs CEO/Founder/Developer at Canal 11th Grade at The Lovett School

Personal Information E-mail: wilsonhobbs1@gmail.com Cell: (404) 719-3252 Website: www.wilsonhobbs.com (https://www.wilsonhobbs.com) Twitter/Instagram/Facebook: @wbhob

Canal Information E-mail: wilson@getcanal.com Web: www.getcanal.com (https://www.getcanal.com/)

Twitter/Instagram/Facebook: @getcanal

On Apr 21, 2017, 3:10 AM -0400, Olivier Destrebecq notifications@github.com, wrote:

Re-opeing issue #6 (https://github.com/CaliStyle/angular2-intercom/issues/6) as I'm getting the same issue. I followed the instruction on he home page, I add the import in my module.ts file, then add ng-intercom to the list of imports and get this error:

ERROR in ./src/app/app.module.ts Module not found: Error: Can't resolve 'ng-intercom' in '/Users/otusweb/Documents/tweetPresenter/tweetapp-web/src/app' @ ./src/app/app.module.ts 18:0-45 @ ./src/main.ts @ multi ./src/main.ts

my app.module.ts file

// angular imports import { BrowserModule } from '@angular/platform-browser'; import { NgModule, ErrorHandler } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { HttpModule, Http, RequestOptions } from '@angular/http'; import { provideAuth, AuthHttp, AuthConfig } from 'angular2-jwt'; // third party imports import {NgbModule} from '@ng-bootstrap/ng-bootstrap'; import {InlineEditorModule} from 'ng2-inline-editor'; import {RollbarModule} from 'angular-rollbar/lib'; import { ProgressHttpModule } from "angular-progress-http"; import { IntercomModule } from 'ng-intercom'; [... other imports ] @NgModule({ declarations: [ AppComponent, PresentationsComponent, PresentationDetailComponent, SlideDetailComponent, HomeComponent, NotFoundComponent, UploadProgressModalContent, BetaGateComponent ], imports: [ BrowserModule, FormsModule, HttpModule, ProgressHttpModule, AppRoutingModule, InlineEditorModule, RollbarModule.forRoot({ accessToken: 'f39c51620ea24d3e81464386ce8e6089', }), NgbModule.forRoot(), IntercomModule.forRoot() ], providers: [ { provide: ErrorHandler, useClass: CustomErrorHandler }, PresentationService, SlideService, UserService, Auth, { provide: AuthHttp, useFactory: authHttpServiceFactory, deps: [ Http, RequestOptions ] }, AuthGuard, BetaGuard, LoggedOutGuard], entryComponents: [UploadProgressModalContent], bootstrap: [AppComponent] }) export class AppModule { }

OS: mac OS 10.12

os: darwin x64 @angular/common: 4.0.2 @angular/compiler: 4.0.2 @angular/core: 4.0.2 @angular/forms: 4.0.2 @angular/http: 4.0.2 @angular/platform-browser: 4.0.2 @angular/platform-browser-dynamic: 4.0.2 @angular/router: 4.0.2 @angular/cli: 1.0.0 @angular/compiler-cli: 4.0.2npm view ng-intercom version0.2.1```

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/CaliStyle/angular2-intercom/issues/7), or mute the thread (https://github.com/notifications/unsubscribe-auth/AEPIEiphXFV_mK331pVJ48yaiGA7_Eygks5ryFZKgaJpZM4ND8QS).

wbhob commented 7 years ago

@scott-wyatt Are you building with npm run build? If not, please build with that command and yank the current version

otusweb commented 7 years ago

The module is installed, I ran npm install ng-intercom first.

I'm building my app with ng build --watch Thanks for pointing the token.

wbhob commented 7 years ago

Cut new version @scott-wyatt

wbhob commented 7 years ago

@scott-wyatt hello? are you there? 😄

scott-wyatt commented 7 years ago

Sorry for the delay, 2.2 is published now on NPM.