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

cheerio problem #236

Closed
Yanstory opened this issue Aug 11, 2024 · 5 comments
Closed

cheerio problem #236

Yanstory opened this issue Aug 11, 2024 · 5 comments

Comments

@Yanstory
Copy link

> svgtofont --sources icons --output fonts

file:///.../svgtofont/lib/utils.js:6
import cheerio from 'cheerio';
       ^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Node.js v18.18.0
@okdios
Copy link

okdios commented Aug 12, 2024

Caused by the release of cheerio@1.0.0 3 days ago. https://github.com/cheeriojs/cheerio/releases/tag/v1.0.0

You can solve it by installing rc.12 until it is fixed. npm install cheerio@1.0.0-rc.12

@borabiricik
Copy link

Issue exists. For easier reproduction:

Folder Structure

- src
-- icons (all the .svg files under this folder)

Generate Icon script

"scripts":{
    "generate-icons": "svgtofont -s ./src/icons -o ./src/styles/icons",
}

Error

import cheerio from 'cheerio';
       ^^^^^^^
SyntaxError: The requested module 'cheerio' does not provide an export named 'default'
    at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
    at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
    at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
    at async loadESM (node:internal/process/esm_loader:28:7)
    at async handleMainPromise (node:internal/modules/run_main:113:12)

Node.js v20.11.1

jaywcjlove added a commit that referenced this issue Aug 12, 2024
jaywcjlove added a commit that referenced this issue Aug 12, 2024
github-actions bot pushed a commit that referenced this issue Aug 12, 2024
@jaywcjlove
Copy link
Owner

@Yanstory @okdios @borabiricik Updating to v5.0.3 might have solved the issue

@okdios
Copy link

okdios commented Aug 12, 2024

v5.0.3 works 👍 Thanks.

@Yanstory
Copy link
Author

yes it is fixed, thanks👍

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

4 participants