keccak.ts:10 Uncaught (in promise) TypeError: createKeccakHash is not a function
at keccak.ts:10:1
at hash-utils.ts:7:1
at keccak (hash.ts:19:1)
at keccak256 (hash.ts:38:1)
at id32 (id.js:11:1)
at ./node_modules/@rarible/protocol-ethereum-sdk/build/config/mainnet.js (mainnet.js:29:1)
at options.factory (react refresh:6:1)
at options.factory (react refresh:6:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:62:1)
const putEvmSDK = async () => {
const sdk = createRaribleSdk(undefined, 'testnet'); // I get an error here
console.log({ sdk });
};
"@rarible/sdk": "0.13.57",
"react": "^18.2.0",
const typescriptLoader = {
test: [/\.ts?$/, /\.tsx?$/],
loader: 'ts-loader',
exclude: /node_modules/,
};
const babelLodaer = {
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
compact: true,
presets: [
'@babel/preset-flow',
[
'@babel/preset-env',
{
targets: {
esmodules: true,
},
},
],
'@babel/preset-modules',
'@babel/preset-react',
'@babel/preset-typescript',
],
plugins: [
'macros',
'@babel/plugin-proposal-class-properties',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-syntax-dynamic-import',
'@babel/plugin-proposal-private-methods',
'@babel/plugin-proposal-private-property-in-object',
'@babel/plugin-syntax-flow',
isDev && require.resolve('react-refresh/babel'),
].filter(Boolean),
},
},
};
const laoders = [fileLoader, svgLoader, babelLodaer, typescriptLoader, cssLoader, resolveMJSLoader];
};
Describe the bug
When creating an sdk instance I get an error inside
@rarible/protocol-ethereum-sdk/build/config/mainnet.jsError:
What causes the error:
To Reproduce
Installed packages
Dependencies:
Additional context
Add any other context about the problem here.
npm list @babel/core= 7.22I also use react-app-rewired
And here are my webpack loaders