Lastorbit
Lastorbit

Reputation: 33

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

Upvotes: 2

Views: 4752

Answers (1)

Ion Utale
Ion Utale

Reputation: 697

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

Upvotes: 3

Related Questions