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

Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler] #36

Open
ClementBu opened this issue Sep 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@ClementBu
Copy link

Hello,

I work in a company using Piwik on our angular for analytics purpose.
I have just upgraded to the latest version of the package on one of our project (npm install @piwikpro/ngx-piwik-pro@latest) and when I run ng serve I get errors:
X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

Steps to reproduce

(Environment: node 20.9.0 / npm 10.1.0 / Angular CLI 17.3.9)

  1. Start a blank angular project:ng new test-piwik ;
  2. Install the latest version of the plugin: npm install @piwikpro/ngx-piwik-pro@latest ;
  3. Import NgxPiwikProModule in your appConfig; add the line bellow to appConfig.providers array:
    importProvidersFrom( NgxPiwikProModule.forRoot('my-id', 'my-container-url') )

image

  1. Run ng serve

Console output:

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/content-tracking/content-tracking.service.d.ts:1:32:
  1 │ import { ContentTracking } from '@piwikpro/tracking-base-library';
    ╵                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/cookie-management/cookie-management.service.d.ts:1:33:
  1 │ import { CookieManagement } from '@piwikpro/tracking-base-library';
    ╵                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/custom-dimensions/custom-dimensions.service.d.ts:1:33:
  1 │ import { CustomDimensions } from '@piwikpro/tracking-base-library';
    ╵                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/custom-event/custom-events.service.d.ts:1:28:
  1 │ import { CustomEvent } from '@piwikpro/tracking-base-library';
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/data-layer/data-layer.service.d.ts:1:26:
  1 │ import { DataLayer } from '@piwikpro/tracking-base-library';
    ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/download-and-outlink/download-and-outlink.service.d.ts:1:35:
  1 │ import { DownloadAndOutlink } from '@piwikpro/tracking-base-library';
    ╵                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/e-commerce/e-commerce.service.d.ts:1:26:
  1 │ import { eCommerce } from '@piwikpro/tracking-base-library';
    ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/goal-conversions/goal-conversions.service.d.ts:1:32:
  1 │ import { GoalConversions } from '@piwikpro/tracking-base-library';
    ╵                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/page-views/page-views.service.d.ts:1:26:
  1 │ import { PageViews } from '@piwikpro/tracking-base-library';
    ╵                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/site-search/site-search.service.d.ts:1:27:
  1 │ import { SiteSearch } from '@piwikpro/tracking-base-library';
    ╵                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/user-management/user-management.service.d.ts:1:31:
  1 │ import { UserManagement } from '@piwikpro/tracking-base-library';
    ╵                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

X [ERROR] TS2307: Cannot find module '@piwikpro/tracking-base-library' or its corresponding type declarations. [plugin angular-compiler]

node_modules/@piwikpro/ngx-piwik-pro/lib/services/user-management/user-management.service.d.ts:9:93:
  9 │ ...>): Promise<import("@piwikpro/tracking-base-library").VisitorInfo>;

Thanks for your help!

Best regards,
Clément

@auto200
Copy link
Contributor

auto200 commented Sep 9, 2024

Hi @ClementBu thank you for reporting the issue. While we work on the solution, can you try adding@piwikpro/tracking-base-library manually as temporary fix? npm i @piwikpro/tracking-base-library

@ClementBu
Copy link
Author

Hi @auto200,
Thank you for your reply. your fix npm i @piwikpro/tracking-base-library did the job 👍

@auto200 auto200 added the bug Something isn't working label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants