CaliStyle / ng-intercom

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

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

Closed juliancarrivick closed 4 years ago

juliancarrivick commented 4 years ago

Versions

Description

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

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 commented 4 years ago

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

dmitrye commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

@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 commented 4 years ago

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.