Typescript Error Duplicate identifier 'localforage'.

there is an Ionic project that can be run before, but the following error occurs after rerunning npm install.

Typescript Error Duplicate identifier "localforage".

I took a look. There are two places where Localforage is defined:
one is in the node_modules/@ionic directory

...ic/node_modules/@ionic/storage/node_modules/localforage/typings/localforage.d.ts

and

the other is in the node_modules directory

...ode/jiyuzhai/Shufadaquan_Ionic/node_modules/localforage/typings/localforage.d.ts

how to solve this kind of error? Do you want to delete one? I am not sure whether the deletion will affect the operation of the project, so I dare not delete it easily.


jiyuzhai/Shufadaquan_Ionic looks like a customized version of ionic, so your environment has two ionic coexisting?

Menu