Replies: 2 comments 2 replies
-
Are you using JS or Typescript? If Typescript, wich Version? |
Beta Was this translation helpful? Give feedback.
1 reply
-
don't know if node v16 supports "exports" in package.json Line 11 in bc2b983 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there, I'm new to this library and pretty new to JS modules in general, but I'm running into issues trying to load this library in my project. My project is an ESM, with the
"type": "module"
set in thepackage.json
file and everything.If I try to import the
parseModule
method using the destructuring export syntax, i.e.import { parseModule } from 'esprima-next';
, I get the following error:SyntaxError: Named export 'parseModule' not found. The requested module 'esprima-next' is a CommonJS module, which may not support all module.exports as named exports.
I've tried all sorts of combinations of
import
andrequire
, but I can't seem to get it working. The only solution I've found is to add the"type": "module"
line to thepackage.json
file inside of my local copy of the esprima-next node module. Is there something I'm missing?Thanks for your help!
Beta Was this translation helpful? Give feedback.
All reactions