-
-
Notifications
You must be signed in to change notification settings - Fork 46
jsep dependency error while using expression-eval #41
Comments
Does |
When I use:
I get the same error: Note that I've set typescript parameters 'esModuleInterop' and 'allowSyntheticDefaultImports' to true. |
@jeromecambon I am also facing the same issue, I modified import statement as: It got modified here: |
This change was made in #37, and fixed an error in @rbayliss's project with the previous syntax. Moreover, it matches what we actually do in the source file, Since I'm not familiar with your various projects and build configurations, I'm not sure I know how to resolve this for everyone. I'm a bit tempted to remove the TypeScript definitions from this project, since it's difficult to maintain them when the source is not TypeScript, and TypeScript itself provides no robust tooling to check whether they're correct. 😕 |
I believe this is fixed by 4.0.0. I've converted the library to typescript, so the type definitions are no longer written by hand. Note that tsconfig does use |
I get the same error in a plain javascript project when in a test (using web-test-runner https://modern-web.dev/docs/test-runner/overview/) importing with: import { parse, eval } from 'expression-eval'; SyntaxError: The requested module './../../jsep/build/jsep.js' does not provide an export named 'default' Probably this package does not comply fully to ECMAScript modules import/export syntax, but maybe rather the older node/cjs types. I'm trying an older version of the package to start with as mentioned on some of the other issues around the import errors. |
From TypeScript ('esnext' module), when trying to use expression-eval:
I get the following error in the console:
Uncaught SyntaxError: The requested module '../../jsep/build/jsep.js' does not provide an export named 'default'
The text was updated successfully, but these errors were encountered: