ENOENT - No such file or directory - Webpack 5.70.0

Viewed 340

We are building an excel add-in (custom functions) .

Though the file (index.html) exists under dist/, getting the following error.

Tried all the solutions similar to this issue. But no luck.

webpack 5.70.0

const app = express(),
            DIST_DIR = __dirname,
            HTML_FILE = path.join(DIST_DIR, 'index.html'),
            compiler = webpack(config)
Error: ENOENT: no such file or directory, open '/Users/xyz/app/dist/index.html'
    at createError (/Users/xyz/app/node_modules/memfs/lib/volume.js:128:17)
    at Volume.openFile (/Users/xyz/app/node_modules/memfs/lib/volume.js:852:15)
    at Volume.openBase (/Users/xyz/app/node_modules/memfs/lib/volume.js:856:25)
    at Volume.openSync (/Users/xyz/app/node_modules/memfs/lib/volume.js:867:21)
    at Volume.readFileBase (/Users/xyz/app/node_modules/memfs/lib/volume.js:953:23)
    at Immediate.<anonymous> (/Users/xyz/app/node_modules/memfs/lib/volume.js:695:33)
    at processImmediate (internal/timers.js:461:21)
0 Answers
Related