js require is not defined

JavaScript
npm install -g browserify
remove "type": "module" from package.json
Source

Also in JavaScript: