Comments (12)
@Urwa9550 Could you let me know what version of the library you are seeing the error with?
Note that as of v5.0.0
the package is ESM only: https://github.com/maxdeviant/redux-persist-transform-encrypt/releases/tag/v5.0.0
from redux-persist-transform-encrypt.
also seeing this error. jest unit testings is also complaining about
Cannot find module 'redux-persist-transform-encrypt'
from redux-persist-transform-encrypt.
same issue when updated to 3.0.1 -> 5.0.0
Any one has a solution?
from redux-persist-transform-encrypt.
also seeing this error. jest unit testings is also complaining about
Cannot find module 'redux-persist-transform-encrypt'
Jest does not natively support ESM.
There is experimental support: https://jestjs.io/docs/ecmascript-modules
from redux-persist-transform-encrypt.
also seeing this error. jest unit testings is also complaining about
Cannot find module 'redux-persist-transform-encrypt'
Jest does not natively support ESM.
There is experimental support: https://jestjs.io/docs/ecmascript-modules
thanks @maxdeviant, I'll take a look at that link. However, I am also seeing OPs issue when trying to run the app locally. Do we need to configure something in the react-native side to get ESM module to work?
from redux-persist-transform-encrypt.
Had the same issue with v5. Now using 3.0.1 without issue
from redux-persist-transform-encrypt.
Hi guys, I've create a PR with a change that fixed this for us, however, I don't think it's really the correct solution.
The trouble we're having comes from Metro, where it states that the package.json file for this package specifically has a "main": "index.js",
, which is not true. It now uses esm module stuff.
So my "fix" is to just add in "main": "lib/index.js",
which solves the problem, but I just don't have enough knowledge of esm module stuff to know if this might become a hinderence elsewhere. Especially given this really sounds more like an issue with packages such as metro than anything else.
In the mean time, the true fix we are using right now is to import the library directly using
import { encryptTransform } from 'redux-persist-transform-encrypt/lib';
(note the /lib
on the end)
from redux-persist-transform-encrypt.
Here is a screenshot of the error that we get on our phones when we load this on iOS (I'm told it's happening on Android too, but I haven't set up my android build environment quite yet). Curiously the bundle builds just fine for web using metro as usual.
from redux-persist-transform-encrypt.
I figured I'd check another package and the natural choice was redux-persist
There the package.json does indeed contain both module
and main
lines. So perhaps I'm on the right track after all.
{
"name": "redux-persist",
"version": "6.0.0",
"description": "persist and rehydrate redux stores",
"main": "lib/index.js",
"module": "es/index.js",
"types": "./types/index.d.ts",
"repository": "rt2zz/redux-persist",
...
from redux-persist-transform-encrypt.
Related Issues (20)
- Is the package supported in react-web? HOT 2
- Convert to TypeScript HOT 1
- Switch to Yarn
- Verify compatibility with redux-persist v6 HOT 2
- Issues with installing, Unable to resolve module `events` HOT 1
- persistor.purge() after error
- Cannot save simple text as state. HOT 2
- Add support for asynchronous encryption HOT 3
- Error: Unable to resolve module `crypto` HOT 2
- ERROR: (0, _reduxPersistTransformEncrypt.default) is not a function HOT 1
- How to update the secretKey async HOT 9
- Update Crypto-js version HOT 2
- Question: Why the Readme says that you should not generate your secret key on the client ? HOT 1
- My persist didnt encrypted HOT 7
- v4 Not working with react-native HOT 7
- Add encryption to project where users already have unencrypted data HOT 1
- How to use .env.local variables with next js13 app directory HOT 2
- Could not run jest unit testcases on updating redux-persis-transform-encrypt package version from "3.0.1"to "5.0.0" HOT 4
- Vitest failing with message - Failed to resolve entry for package "redux-persist-transform-encrypt" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redux-persist-transform-encrypt.