4

Iam using Angular 12, I installed cookie by using: npm install --save ngx-cookie-service
in app.module.ts when I import 'CookieService' import { CookieService } from 'ngx-cookie-service'; I got this error message: Cannot find module 'ngx-cookie-service' or its corresponding type declarations.ts(2307) enter image description here

Pavan Jadda
  • 4,306
  • 9
  • 47
  • 79

2 Answers2

7

It looks like this is a reported issue with ngx-cookie-service version 12.0.1. Downgrading to 12.0.0 seems to fix the problem for now.

npm install ngx-cookie-service@12.0.0

-- UPDATE -- The issue is flagged as resolved with the release of version 12.0.2. Should be safe to install the latest now.

dgates82
  • 398
  • 3
  • 8
2

I had the same problem with version 13.1.2!

I solved this by running an : npm install.

Carcamano
  • 1,153
  • 2
  • 11
  • 24
abdelgrib
  • 843
  • 7
  • 11