developer-content
developer-content copied to clipboard
Error when executing "How to Sign and Verify a Message" example
Error when executing https://solana.com/developers/cookbook/wallets/sign-message
/index.js:2
generateKeyPair,
^^^^^^^^^^^^^^^
SyntaxError: Named export 'generateKeyPair' not found. The requested module '@solana/web3.js' 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 '@solana/web3.js';