Question: referenceerror require is not defined in node js?
Answer: node. js is a server-side Javascript execution environment that combines the V8 Javascript engine with a bunch of server-side libraries. ... js, not of a browser. So, when you try to have the browser run your script, it does not have require() .