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

Named export 'postprocess' not found. #9

Open
pzwwei opened this issue Jun 29, 2023 · 3 comments
Open

Named export 'postprocess' not found. #9

pzwwei opened this issue Jun 29, 2023 · 3 comments

Comments

@pzwwei
Copy link

pzwwei commented Jun 29, 2023

import pkg from 'file:///Users/shashou/Downloads/nuxt3-tailwind-kit/node_modules/micromark/lib/postprocess.js';
const { postprocess } = pkg;

import { postprocess } from 'node_modules/micromark/lib/postprocess.js';
^^^^^^^^^^^
SyntaxError: Named export 'postprocess' not found. The requested module 'node_modules/micromark/lib/postprocess.js' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from 'node_modules/micromark/lib/postprocess.js';
const { postprocess } = pkg;

at ModuleJob._instantiate (node:internal/modules/esm/module_job:123:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:189:5)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:530:24)
at async loadESM (node:internal/process/esm_loader:91:5)
at async handleMainPromise (node:internal/modules/run_main:65:12)

@gravitano
Copy link
Owner

Hi @pzwwei, can you provide minimal reproduction?

Also, what environment are you using?

OS: ?
Node.js Version: ?
Package Manager: ?

@fatid
Copy link

fatid commented Jul 21, 2023

Hi, i've got same fail.
OS: IOS
Node V: v18.12.1
Package Manager: npm

@gravitano
Copy link
Owner

Can you try with pnpm instead?

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

No branches or pull requests

3 participants