Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: The requested module 'es-module-lexer' does not provide an export named 'default' #325

Closed
mvdschee opened this issue Dec 29, 2021 · 2 comments
Labels

Comments

@mvdschee
Copy link

src/optimizer/optmize-deps.ts uses es-module-lexer' which says gives the following error in unbuild

yarn run v1.22.15
$ unbuild
[hidden]/ual-wax/node_modules/rollup-plugin-esbuild/dist/index.mjs:125
import esModuleLexer from "es-module-lexer";
       ^^^^^^^^^^^^^
SyntaxError: The requested module 'es-module-lexer' does not provide an export named 'default'
    at ModuleJob._instantiate (internal/modules/esm/module_job.js:121:21)
    at async ModuleJob.run (internal/modules/esm/module_job.js:166:5)
    at async Loader.import (internal/modules/esm/loader.js:178:24)
    at async Object.loadESM (internal/process/esm_loader.js:68:5)
error Command failed with exit code 1.
@egoist egoist closed this as completed in 875aed8 Dec 29, 2021
@mvdschee
Copy link
Author

package recommended usage https://github.com/guybedford/es-module-lexer/tree/main#usage

import { init, parse } from 'es-module-lexer';

or if you want it named

import * as esModuleLexer from 'es-module-lexer';

@github-actions
Copy link

🎉 This issue has been resolved in version 4.8.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant