[Solved] internal/modules/cjs/loader.js:892 ^Error: Cannot find module ‘C:\Users\LX\Desktop\Node_DEMO\a

When I first started learning node.js, I reported an error at the beginning and my mentality collapsed

———————————————————————————–

I create a folder node on my desktop_ Demo, my xx.js file is in node_ demo> demo2> app.js

In vscode, I directly Ctrl + ` (backquote) to open the terminal, but the following error occurs

Look at the path carefully and find that it is wrong. My app.js should be in demo2. Maybe this shortcut does not open the target file….

Therefore, click JS file in the left directory, right-click and select open to open it in the integration terminal~~

Successful problem solving is tiring~~~~

Read More: