How to solve this error: "internal/modules/cjs/loader.js:638 throw err; ^" How to solve this error: "internal/modules/cjs/loader.js:638 throw err; ^" vue.js vue.js

How to solve this error: "internal/modules/cjs/loader.js:638 throw err; ^"


Before you go uninstalling everything, try closing the terminal and trying again in a new Terminal instance


I had a similar issue which I solved by noticing that when I followed the advice here: https://github.com/nklayman/vue-cli-plugin-electron-builder/issues/1056#issuecomment-699456515and proceeded to run npm run build which is what was giving me that error, it would work inside of the newly created project with vue create <project-name>.I had my code in a repository so I recloned it, copied the node_modules folder into my working directory and then ran it again and it worked.


If you want to update NodeJS and it is not achieving, try the nvm instead.I was trying in my Ubuntu and I used curl:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash

If there isn't the file .bashrc, try execute: source ~/.bashrc

And then: nvm list-remote

Finally, install: nvm install v13.6.0 (That's today version - 2021).