I am trying to create a Web3AuthModalPack instance using the Web3Auth pack. I am following this guide: https://docs.safe.global/safe-core-aa-sdk/auth-kit/web3auth I am getting this error when running ts-node-esm web3Auth.ts:


import { CHAIN_NAMESPACES, WALLET_ADAPTERS } from "@web3auth/base"; ^^^^^^^^^^^^^^^^ SyntaxError: Named export 'CHAIN_NAMESPACES' not found. The requested module '@web3auth/base' is a CommonJS module, which may not support all module.exports as named exports. CommonJS modules can always be imported via the default export, for example using:

import pkg from '@web3auth/base'; const { CHAIN_NAMESPACES, WALLET_ADAPTERS } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

1 Answer 1


The web3Auth pack was deprecated recently in favor of the safeAuth pack developed in collaboration with Web3Auth. Please head towards our updated documentation for a complete reference.

Hope it helps, Louis

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.