Error: Dynamic require defined at line 4; not supported by Metro
Error: Requiring module "node_modules/@celo/identity/lib/index.js", which threw an exception: Error: Dynamic require defined at line 4; not supported by Metro
Error: Requiring module "node_modules/@celo/identity/lib/index.js", which threw an exception: Error: Dynamic require defined at line 4; not supported by Metro
Error: Requiring module "node_modules/@celo/identity/lib/index.js", which threw an exception: Error: Dynamic require defined at line 4; not supported by Metro
Error: Requiring module "node_modules/@celo/identity/lib/index.js", which threw an exception: Error: Dynamic require defined at line 4; not supported by Metro
It occurs when I add the following code to my utility file.
const response = await OdisUtils.PhoneNumberIdentifier.getPhoneNumberIdentifier(
this.phoneNumber, this.account, this.authSigner, serviceContext);
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OdisUtils = void 0;
var odis_1 = require("./odis");
Object.defineProperty(exports, "OdisUtils", { enumerable: true, get: function () { return odis_1.OdisUtils; } });
//# sourceMappingURL=index.js.map
Discussed in https://github.com/celo-org/identity/discussions/24
Originally posted by Allen-Muhani June 7, 2022
Hi @0xarthurxyz.
I am using @celo/identity version 2.0.0
I am running into the following error when using the @celo/identity library to perform attestation.
It occurs when I add the following code to my utility file.
Here is how I import ODIS:
import { OdisUtils } from '@celo/identity';Here is the node_modules/@celo/identity/lib/index.js file content
Thanks