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

Error [ERR_REQUIRE_ESM]: require() of ES Module y code: 'ERR_REQUIRE_ESM' #475

Open
MichaelDevCR opened this issue Nov 27, 2024 · 0 comments

Comments

@MichaelDevCR
Copy link

Hello

I am getting this error in the last version10.0.0, if I use slug 8.2.3, it works as respected

it looks like the syntaxis of import is not getting this library and is conflicting with the type of ESmodule

Code:

import slug from 'slug';

export const name= async (req: Request, res: Response)=>{

const {email, password, handle} = req.body;// all are strings

console.log(slug(handle));

}
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

1 participant