0

Our application is showing this error in the console. Please help if anybody knows about it.

Error-

Uncaught ReferenceError: Buffer is not defined
    at varintEncode (util.js:33:1)
    at ./node_modules/multicodec/src/varint-table.js (varint-table.js:11:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ./node_modules/multicodec/src/index.js (index.js:16:1)
    at options.factory (react refresh:6:1)
    at __webpack_require__ (bootstrap:24:1)
    at fn (hot module replacement:62:1)
    at ./node_modules/content-hash/src/index.js (index.js:19:1)[enter image description here][1]

1 Answers1

-1

I succeed to solve the problem by following those steps:

  1. Uninstall Webpack 5: npm uninstall webpack

  2. delete package-lock.json

  3. Go to package.json and change from "React-scripts": "5.0.0" to "React-scripts": "4.0.3",

  4. install webpack 4: npm install webpack@4.44.2

  5. npm install

  6. npm run start

I hope it helps, if yes don't hesitate to upvote ;)

KHOUIEL Salah
  • 89
  • 1
  • 7