Hey guys, i am unable to get this to work. any idea what i need to do? I am trying to integrate web3 and wallet connect “@walletconnect/web3-provider” in my ember app
Here is the error i am getting
sha3.js:8 Uncaught (in promise) ReferenceError: browser is not defined
at eval (sha3.js:8:343)
at eval (sha3.js:9:104)
at Object../node_modules/js-sha3/src/sha3.js (chunk.vendors-node_modules_walletconnect_web3-provider_dist_esm_index_js.cf9b7ec87bddf1c2045a.js:2629:1)
at __webpack_require__ (chunk.app.95131fd67af3d919a0d5.js:53:42)
at eval (ethereum.js:8:65)
at Module../node_modules/@walletconnect/utils/dist/esm/ethereum.js (chunk.vendors-node_modules_walletconnect_web3-provider_dist_esm_index_js.cf9b7ec87bddf1c2045a.js:652:1)
at __webpack_require__ (chunk.app.95131fd67af3d919a0d5.js:53:42)
at eval (index.js:104:67)
at Module../node_modules/@walletconnect/utils/dist/esm/index.js (chunk.vendors-node_modules_walletconnect_web3-provider_dist_esm_index_js.cf9b7ec87bddf1c2045a.js:663:1)
at __webpack_require__ (chunk.app.95131fd67af3d919a0d5.js:53:42)
Here is my ember-cli-build configs for auto import
'ember-cli-babel': {
includePolyfill: true,
},
babel: {
plugins: [
'transform-object-rest-spread',
require.resolve('ember-auto-import/babel-plugin')
]
},
autoImport: {
pubicAssetURL: isProductionLike ? cdnPath + 'assets/' : '',
//exclude: [],
webpack: {
resolve: {
fallback: {
"crypto": require.resolve("crypto-browserify"),
"stream": require.resolve("stream-browserify"),
"assert": require.resolve("assert"),
"http": require.resolve("stream-http"),
"https": require.resolve("https-browserify"),
"os": require.resolve("os-browserify"),
"url": require.resolve("url"),
"buffer": require.resolve("buffer"),
"path": require.resolve("path-browserify")
}
},
plugins: [
new webpack.DefinePlugin({
process: "process/browser",
stream: "stream-browserify",
zlib: "browserify-zlib",
util: 'util',
Buffer: ['buffer', 'Buffer']
})
],
node: {
global: true
}
}
},