Open bsor-dev opened 2 years ago
Latest version
@types/redux-persist redux-persist
Could not find a declaration file for module 'redux-persist/lib/storage'.
Try npm i --save-dev @types/redux-persist if it exists or add a new declaration (.d.ts) file containing `declare module 'redux-persist/lib/storage';
npm i --save-dev @types/redux-persist
Can't find the solution in the whole internet. Even you modify the tsconfig, still getting same that error
My TS config
{ "compilerOptions": { "lib": ["dom", "dom.iterable", "esnext"], "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "removeComments": true, "preserveConstEnums": true, "strict": true, "alwaysStrict": true, "strictNullChecks": true, "noUncheckedIndexedAccess": true, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true, "noUnusedParameters": true, "allowUnreachableCode": false, "noFallthroughCasesInSwitch": true, "target": "es5", "outDir": "out", "declaration": true, "sourceMap": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "allowJs": false, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "jsx": "preserve", "noEmit": true, "isolatedModules": true, "incremental": true, "baseUrl": ".", "paths": { "@/*": ["./src/*"], "@/public/*": ["./public/*"] } }, "exclude": ["./out/**/*", "./node_modules/**/*"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"] }
Delete @types/redux-persist, redux-persist has builtin typings.
@types/redux-persist
redux-persist
add /// <reference types="redux-persist" /> to your next-env.d.ts file and you should be fine.
/// <reference types="redux-persist" />
Latest version
@types/redux-persist redux-persist
Could not find a declaration file for module 'redux-persist/lib/storage'.
Try
npm i --save-dev @types/redux-persist
if it exists or add a new declaration (.d.ts) file containing `declare module 'redux-persist/lib/storage';Can't find the solution in the whole internet. Even you modify the tsconfig, still getting same that error
My TS config