Closed vrseraphin closed 1 year ago
This is not the place to ask general Node.js questions. This is a valid package. Any errors with importing is a problem with your code or bundler config.
For those curious... myOpen = mod.default;
resolved the issue.
Can't seem to import this library using the import method and have the resultant module work.
When I attempt to use it in this manner: let myOpen = null; import('open').then((mod) => { myOpen = mod; myOpen("https://www.google.com"); });
attempts to use myOpen as a function fail with:
TypeError: myOpen is not a function
Curious if there is a reason why the library doesn't seem to work by dynamic import....or if there is a workaround to get it to work.