Connect2IC / connect2ic

https://connect2ic.github.io/docs/
MIT License
92 stars 19 forks source link

Error: Can't resolve './precomputed/secp256k1' #2

Closed fermartz closed 2 years ago

fermartz commented 2 years ago

Hey guys,

Any idea why I'm getting this error?

Module not found: Error: Can't resolve './precomputed/secp256k1'

It looks like it should be pre = require("secp256k1"); ???

I have : "react": "^18.1.0", "react-dom": "^18.1.0", "webpack": "5.63.0",

MioQuispe commented 2 years ago

Hey guys,

Any idea why I'm getting this error?

Module not found: Error: Can't resolve './precomputed/secp256k1'

It looks like it sahould be pre = require("secp256k1"); ???

I have : "react": "^18.1.0", "react-dom": "^18.1.0", "webpack": "5.63.0",

Hey man! everything going well? It might be something specific to webpack. I will investigate tomorrow, still early days and lots of work to be done.

fermartz commented 2 years ago

Hey @MioQuispe ,

I'm doing great...how about you?

Great job with this toolkit. connect2IC is 🔥 🔥 🔥

I'm not sure if webpack is the issue but I modified the following lines in connect2ic-core.es.js and connect2ic-react.es.js and it worked:

Instead of this:

pre = require("./precomputed/secp256k1");

I did this:

pre = require("secp256k1");

Thanks

fermartz commented 2 years ago

I'm closing this since the main issue was react 18. As long as you use any version below 18 you should not have the issue.