skip to Main Content

I installed react-scroll library via ‘npm install react-scroll’ and after that I also run ‘npm fix audit –force’ to fix some vulnerabilities. That results in my app not running again. I tried some fixes here still struggling to fix the issue. I need help 😫.

I tried pasting this

const crypto = require("crypto"); const crypto_orig_createHash = crypto.createHash; crypto.createHash = algorithm => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm);

in node_modulesreact-scriptsconfigwebpack.config.js

Now the app is saying it cannot compile

2

Answers


  1. Chosen as BEST ANSWER

    I think the best solution I found which fixed the problem is to remove the node_modules folder and run npm install.


  2. I got an error called "This site can’t be reached" after executing npm fix audit --force when installing Ant Design into VS Code. So, I tried a couple of things but none of them worked.

    • The used Environment is Node.js and the Library is React.

    So, I downgraded the Node.js to version 16 and it fixed my problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search