What is ReferenceError in JavaScript?


It occurs when you can a undefined method

 

The "ReferenceError: path is not defined" occurs when we use the path module without importing it in a Node.js application.


So you only need to required library at the head of your file



const path = require('path');

Tags:

Share:

Related posts