简体   繁体   中英

Why do I keep getting throwing this error? node : internal /modules /cjs/ loader 944 Throw Err ^ (Cannot find module)

node:internal/modules/cjs/loader:944 throw err; ^ Error Cannot find module'C:\Coding\git\Mixed-Messages.js

Cannot Find Module

Look at Image for source code

it looks like you are on a different directory (folder).

i suggest you to navigate via "windows explorer" to the where the file "Mixed-Messages.js" is located and then right click on the file , open in cmd

this should do the trick

EDIT:

from you last message it looks like the name of the file that you are trying to execute is incorrect.

try running:

 node "Mixed Messages.js"

or

 node Mixed\ Messages.js

Free tip: as best practice you should name the files without spaces. files should be named:

  • Camel Case. ex: mixedMessages.js
  • Kebab Case. ex: mixed-messages.js

the 2 above are the most common.

source: https://en.wikipedia.org/wiki/Naming_convention_(programming)#Lisp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM