Comments (4)
Figured it out after 2 hours. Since this error only happens during production, I figured to diff the outputs from the sourced-maps enabled versions. Turns out that the minifier would mess enough of the class names for the types to not be parsed during the writeJSON
. For whoever might see this in the future, this is the line that helped me in my next.config.js
although likely would be needed in similar webpack-bundling setups:
webpack: (config) => {
config.optimization.minimize = false;
return config;
},
from zkp-ecdsa.
FWIW I tried updating the same tsconfig.json
, the same typescript
version, importing reflect-metadata
, using Proxy
to wrap the Type and then pass the instance to the writeJson
, using directly TypedJSON.stringify
, JSON.stringify
, and nothing worked.
Would it be possible to give a try to run the read/write|Json
code against a browser runner? I've seen most of this code in action already used in browsers, but just the serializing part might be broken.
from zkp-ecdsa.
This is the exact line and the exact values where the error kicks in, which bubbled down from const proof = writeJson(SignatureProofList, attestation.proof);
.
I've no idea how to replicate this as the tests are ran against node.js
environment, but might look into getting this replicated to begin with outside of the current framework (i.e. nextjs
)
from zkp-ecdsa.
As a final note on my side, this only happens with SignatureProofList
. When running const JSONParams = writeJson(SystemParametersList, attestation.params);
I've got no errors.
from zkp-ecdsa.
Related Issues (7)
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 zkp-ecdsa.