I want to use urllib in javascript project (precisely for chrome extension). I need to use some node modules and that includes also urllib. I found out that by using browserify, it is possible to do so. But I got this error after creating the bundle file for urllib.
Here is how i tried to include urllib in my project:
npm install urllib --savebrowserify -r urllib -o bundle.js
Here is the error I received in bundle.js file:
Uncaught TypeError: Cannot read property 'split' of undefined
var NODE_MAJOR_VERSION = parseInt(process.versions.node.split('.')[0]);
Does anyone know whether it is because urllib is not compatible with browserify or have I overlooked any step?