-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web3auth integration #24633
Comments
Are you really using jhipster 6.9.1? Please try it again with v8 or at least v7. |
I just updated to 8.1.0 and I still receive the same message. It happens when I try to load the web3auth object: import { Web3Auth } from "@web3auth/modal"; // IMP START - SDK Initialization const chainConfig = { const web3auth = new Web3Auth({ |
You might try using Auth0 and using their Web3 integrations. |
Unfortunately that won't work. I need to use web3auth for key management. I have never had an issue loading it in React apps using Vite or NextJS. There has to be an easy solution for this or why even use JHipster? |
Can you create a sample project and share it here? |
The lib you are trying to import looks to be ESM.
In any case this is not a feature provided by JHipster so I will close the issue. |
Overview of the issue
When I try and import web3auth, I receive the following errors:
ERROR in ./node_modules/@metamask/utils/dist/chunk-NQMRFZHB.mjs 8:51
Module parse failed: Unexpected token (8:51)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
| import { pattern } from "superstruct";
| var base64 = (struct, options = {}) => {
ERROR in ./node_modules/ethereum-cryptography/node_modules/@noble/curves/abstract/weierstrass.js 920:61
Module parse failed: Unexpected token (920:61)
File was processed with these loaders:
You may need an additional loader to handle the result of these loaders.
| const u1 = modN(h * is); // u1 = hs^-1 mod n
| const u2 = modN(r * is); // u2 = rs^-1 mod n
| if (!R)
| return false;
ℹ 「wdm」: Failed to compile.
ERROR in /web-app/node_modules/@toruslabs/base-controllers/dist/types/interfaces.d.ts(32,43):
TS2693: 'boolean' only refers to a type, but is being used as a value here.
ERROR in /web-app/node_modules/@toruslabs/base-controllers/dist/types/interfaces.d.ts(33,5):
TS2304: Cannot find name 'configure'.
ERROR in /web-app/node_modules/@toruslabs/base-controllers/dist/types/interfaces.d.ts(33,15):
TS2304: Cannot find name 'config'.
Motivation for or Use Case
Anyone who is trying to implement web3auth with JHipster will run into this same issue. This is a huge blocker for anyone wanting to integrate web3auth key management into their current JHipster project.
Reproduce the error
I am running: npm run webpack:dev
Related issues
Suggest a Fix
JHipster Version(s)
"jhipsterVersion": "6.9.1",
JHipster configuration
{
"generator-jhipster": {
"promptValues": {
"nativeLanguage": "en"
},
"jhipsterVersion": "6.9.1",
"applicationType": "monolith",
"baseName": "my_app",
"useSass": true,
"clientPackageManager": "npm",
"clientFramework": "react",
"clientTheme": "none",
"clientThemeVariant": "",
"authenticationType": "jwt",
"cacheProvider": "no",
"databaseType": "sql",
"devDatabaseType": "sql",
"prodDatabaseType": "sql",
"creationTimestamp": 1655190950198,
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [],
"enableTranslation": true,
"nativeLanguage": "en",
"languages": ["en"],
"blueprints": [],
"skipServer": true
}
}
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System
Chrome and Safari
The text was updated successfully, but these errors were encountered: