Closed zachsa closed 1 year ago
(as far as I can tell this wasn't an issue in Node v16.14.2)
You'd need to create a custom Node.js loader that can get around this restriction in Node.js. Work on such a project would be great to see. Happy to provide guidance if you're interested in working on this, it should be a relatively small OSS project.
I did get this to work - I got a little confused updating the loaders from the old v16 API to the new one. Here is a reference in case this is of some help: https://github.com/SAEON/somisana/blob/94b86fb95e5255c49bcf095930289ee15f263b4b/web/chompfile.toml#L29-L31
Hi,
Using the generator to create an import map for Node.js, many NPM libraries reference Node.js std lib libraries. Using Node.js 19.5.0, I am getting
ERR_NETWORK_IMPORT_DISALLOWED
whenever a library that is loaded fromga.jspm.io
imports a node.js std lib import.For example:
I can omit dependencies from the Node import map that reference std lib modules, but there are many client libraries that also reference std libraries. And in some cases client libraries and server libraries have the same dependency.
For example the
graphql
library is used by Apollo client and Apollo server libraries. If I omit thegraphql
library then my Node.js application imports 2 separate instances ofgraphql
. This gives the following error:Here's another example using the
koa
library: https://generator.jspm.io/#02JhYGBkDM0rySzJSU1hyM5PdDDSMzTRMwQAmC7v/RkA.As far as I can tell, Node.js will not allow importing
node:assert
from a library loaded over HTTPS. Is there any way to address this?