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

[8.0.1] Cannot find module 'ng-intercom' #99

Closed
juliancarrivick opened this issue Jan 22, 2020 · 5 comments
Closed

[8.0.1] Cannot find module 'ng-intercom' #99

juliancarrivick opened this issue Jan 22, 2020 · 5 comments

Comments

@juliancarrivick
Copy link

juliancarrivick commented Jan 22, 2020

Versions

  • Angular: 8.2.14
  • Angular CLI: 8.3.23
  • ng-intercom: 8.0.1
  • Node.JS: 10.15.3
  • NPM: 6.9

Description

Typescript is unable to resolve the module when importing from "ng-intercom"
Repro:

  • ng new ng-intercom-repro
  • npm install --save ng-intercom
  • Add import { IntercomModule } from "ng-intercom" and IntercomModule.forRoot({appId: ''}) to imports in app.module.ts
  • ng build
ERROR in src/app/app.module.ts:5:32 - error TS2307: Cannot find module 'ng-intercom'.

5 import { IntercomModule } from "ng-intercom";
                                 ~~~~~~~~~~~~~

If I then install 8.0.0 with npm install ng-intercom@8.0.0 it then works.

@andy-hook
Copy link

@scott-wyatt – I encountered this trying to upgrade this morning, looks like the src folder was published instead of the built dist

@dmitrye
Copy link

dmitrye commented Jan 22, 2020

Getting a similar issue: Cannot use namespace 'Intercom' as a type. Was on 8.0.0 beta then today it was automatically updated to 8.0.1 and now all the builds break.

@lazarljubenovic
Copy link

The issue seems to be fact that the dist folder isn't published, while package.json claims the following:

"main": "./dist/ng-intercom.js",

The directory doesn't exist though; thus the whole module isn't properly recognized by TypeScript's resolution algorithm. The previous version of this package (8.0.0) had a different folder structure altogether, with proper mappings provided in package.json. Simply reverting back to 8.0.0 fixed the issue.

@andy-hook
Copy link

@scott-wyatt, @wbhob – I appreciate your work on this package, and again, I hate to nag, but when can we expect to have this resolved? As far as I can see this just needs republishing using the correct dist directory.

@scott-wyatt
Copy link
Member

Hi all, forgot to read my own documentation, I apologize for that. Typically the CI/CD takes care of publishing, but there is an unrelated to the library error that is making the tests fail, and we are pretty swamped. I'll be publishing 8.0.2 in a few moments.

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

5 participants