Node.js Error: cannot find module ‘xxx’

Create a new notepad on the desktop, write the familiar Hello word, and save it with the suffix JS

What I wrote is just a helloword, which doesn’t involve any package management tools, so don’t bother with NPM. This error is simply that I can’t find the file.

Simple solution: press the shift key in the blank space of the desktop without putting the right mouse button, select here to open the command window, and then edit it properly, or type the path in the DOS interface.

Conclusion: in fact, it is a problem of path~

Read More: