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 'parse' not found. The requested module 'node-html-parser' is a CommonJS module, which may not support all module.exports as named exports. #1379

Closed
IRediTOTO opened this issue May 7, 2021 · 1 comment

Comments

@IRediTOTO
Copy link

Describe the bug
Hi, in my end point. I just import norman like this
import { parse } from 'node-html-parser';
Everything run well on dev mode npm run dev

Then I run npm run build no error too
but on npm run preview

console fire this error

Logs

> Named export 'parse' not found. The requested module 'node-html-parser' 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-html-parser';
const {parse} = pkg;

To Reproduce
I don't think need it, but tell me if you need

Expected behavior
Just need it run smooth :c

@babichjacob
Copy link
Member

babichjacob commented May 7, 2021

Closing for being a support question rather than a bug with SvelteKit. I'd also suggest upgrading to Node 14.16.1 if not 16.1.0 to solve this (because I've seen that be the reason for issues with a similar error message).

Support questions are better in the Discord server or on Stack Overflow.

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

2 participants