require is not defined node.js code example Example: require is not defined remove "type": "module" from package.json