Running with issues while using fhevmjs

lib\tfhe_bg.wasm doesn’t exist
came across this error recently while using webpack

Hello!
This is a known issue with webpack, you can find a workaround here Other frontend tooling - fhEVM

Otherwise, we strongly recommend to our users to use one of our templates or just use Vite since everything is working out of the box.

1 Like

i tried the Other frontend tooling - fhEVM but it still failed tho. this is what i have in the webpack.config.ts:

const path = require('path');

module.exports = {
    // entry: './src/index.js',
    // output: {
    //     filename: 'main.js',
    //     path: path.resolve(__dirname, 'dist'),
    // },
    // module: {
    //     rules: [
    //         {
    //             test: /\.tsx?$/,
    //             use: 'ts-loader',
    //             exclude: /node_modules/,
    //         },
    //     ],
    // },
    resolve: {
        // extensions: ['.tsx', '.ts', '.js'],
        fallback: {
          'tfhe_bg.wasm': require.resolve('tfhe/tfhe_bg.wasm'),
        },
      },
};