question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

typescript incompatible with latest version of redux-persist

See original GitHub issue

Versions: TS: 2.7.1 redux-persist: 5.6.5

All of the sub directory imports are not possible when using typescript with redux-persist. Example:

import storage from 'redux-persist/lib/storage'
// error:
[ts]
Could not find a declaration file for module 'redux-persist/lib/storage'. '.../node_modules/redux-persist/lib/storage/index.js' implicitly has an 'any' type.
  Try `npm install @types/redux-persist` if it exists or add a new declaration (.d.ts) file containing `declare module 'redux-persist';`

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

15reactions
i8wucommented, Mar 2, 2018

still an issue on “redux-persist”: “5.9.1”

6reactions
y471ncommented, Sep 25, 2021

I resolved this by adding

"files": ["./node_modules/redux-persist/types/storage/index.d.ts"],

to the tsconfig.json file.

Read more comments on GitHub >

github_iconTop Results From Across the Web

redux-persist error. "Types of parameters 'prevState' and 'state ...
I am trying to create an authorization state using redux-persist and save it with the timeslot state in the store. The error isn't...
Read more >
'router' cannot be used as a jsx component. its instance type ...
I am using react-redux with redux-persist in a react js application with TypeScript. store.jsx. import {applyMiddleware, createStore} from ' ...
Read more >
redux-persist - npm
Latest version : 6.0.0, last published: 3 years ago. Start using redux-persist in your project by running `npm i redux-persist`.
Read more >
Troubleshooting | React Navigation
You can install the latest versions by installing the packages again (e.g. ... This might happen if you have an old version of...
Read more >
Redux-persist (v6) in detail (React) - DEV Community ‍ ‍
This usually comes in handy when you make some big changes in your redux state and its not compatible with the previously saved...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found