Solve Error Uncaught ReferenceError: require is not defined in Node.js
The Crazy Programmer
MAY 8, 2020
While working with Node JS, you might be familiar with the require() and sometimes, it shows error like Uncaught ReferenceError: require is not defined. So why does this happens? Let’s see in today’s post. Before coming to the error, let’s know what is require() used for. What is require? The require function is the builtin function of node js that helps us to include local or node_modules in our project that exists in a separate file. const express = require('express') const
Let's personalize your content