Sunday 22 September 2019

Node v12.4.0 - can't resolve 'net' or 'tls'

I am using @google/maps which uses https-proxy-agent. When I attempt to use @google/maps, I get the following errors: -ERROR in ./node_modules/https-proxy-agent/index.jsModule not found: Error: Can't resolve 'net' in '/var/www/node_modules/https-proxy-agent'@ ./node_modules/https-proxy-agent/index.js 5:10-24@ ./node_modules/@google/maps/lib/internal/make-url-request.js@ ./node_modules/@google/maps/lib/internal/make-api-call.js@ ./node_modules/@google/maps/lib/index.js​ERROR in ./node_modules/https-proxy-agent/index.jsModule not found: Error: Can't resolve 'tls' in '/var/www/node_modules/https-proxy-agent'@ ./node_modules/https-proxy-agent/index.js 6:10-24@ ./node_modules/@google/maps/lib/internal/make-url-request.js@ ./node_modules/@google/maps/lib/internal/make-api-call.js@ ./node_modules/@google/maps/lib/index.jsThese are called from https-poxy-agent: -var net = require('net');var tls = require('tls');Now, it is my understanding that these modules are intrinsic to nodeJs. So the question is obvious... why aren't these being found? Is there something wrong with my node version or have I somehow failed to install it correctly? Thanks.

Submitted September 22, 2019 at 08:11PM by U4-EA

No comments:

Post a Comment