user10747832
user10747832

Reputation:

Angular 7: cannot find the type definition file

Yesterday my project worked well but today I encounter an error after the installation of ngx-pagination module:

ERROR in src/app/views/dashboard/step1/step1.component.ts(1,23): error TS2688: Cannot find type definition file for '@types/googlemaps'. src/app/views/dashboard/step1/step1.component.ts(187,34): error TS2304: Cannot find name 'google'. src/app/views/dashboard/step1/step1.component.ts(190,29): error TS2304: Cannot find name 'google'. src/app/views/dashboard/step1/step1.component.ts(193,26): error TS2503: Cannot find namespace 'google'. src/app/views/job/quick-job-form/quick-job-form.component.ts(1,23): error TS2688: Cannot find type definition file for '@types/googlemaps'. src/app/views/job/quick-job-form/quick-job-form.component.ts(182,34): error TS2304: Cannot find name 'google'. src/app/views/job/quick-job-form/quick-job-form.component.ts(188,29): error TS2304: Cannot find name 'google'. src/app/views/job/quick-job-form/quick-job-form.component.ts(191,26): error TS2503: Cannot find namespace 'google'. src/app/views/job/quick-job-form/quick-job-form.component.ts(336,24): error TS2304: Cannot find name 'google'.

Please help me.

Upvotes: 5

Views: 12992

Answers (2)

Lukas Mohs
Lukas Mohs

Reputation: 410

This package is deprecated now, types for the Google Maps browser API have moved to @types/google.maps:

npm install --save @types/google.maps 

Upvotes: 6

veben
veben

Reputation: 22292

It seems that you are using @types/googlemaps in your step1.component.ts file, and other files listed in the error. Remove the utilisation of this component, or install it, with this command:

npm install --save @types/googlemaps

Upvotes: 5

Related Questions