TypeError: parse is not a function
See original GitHub issueSummary
Running honkit in a yarn
’d monorepo causes TypeError
- HonKit version:
4.0.0.
Step to reproduce
git clone https://github.com/island-is/island.is
yarn add --dev honkit
yarn honkit init --log=debug
Any of init
, build
, serve
, etc. will cause the same error.
Expected results
Non-error
Actual results
TypeError: parse is not a function
at compileUnsafe (/var/home/user/honkit-reproduce/node_modules/cheerio/node_modules/css-select/lib/compile.js:31:14)
at select (/var/home/user/honkit-reproduce/node_modules/cheerio/node_modules/css-select/index.js:18:49)
at CSSselect (/var/home/user/honkit-reproduce/node_modules/cheerio/node_modules/css-select/index.js:41:9)
at exports.find (/var/home/user/honkit-reproduce/node_modules/cheerio/lib/api/traversing.js:34:21)
at module.exports (/var/home/user/honkit-reproduce/node_modules/cheerio/lib/cheerio.js:81:18)
at new initialize (/var/home/user/honkit-reproduce/node_modules/cheerio/lib/static.js:26:20)
at initialize (/var/home/user/honkit-reproduce/node_modules/cheerio/lib/static.js:23:14)
at Object.parse (/var/home/user/honkit-reproduce/node_modules/@honkit/html/lib/dom.js:17:17)
at parseSummary (/var/home/user/honkit-reproduce/node_modules/@honkit/html/lib/summary.js:140:19)
at /var/home/user/honkit-reproduce/node_modules/@honkit/html/lib/index.js:26:19
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
TypeError: parse is not a function on csv-parse - Stack Overflow
Solution was simple. If parse or any other function is not recognized with node require , try getting the function itself as:
Read more >TypeError: parser is not a function · Issue #518 - GitHub
This error occurs because micromark (https://github.com/micromark/micromark/releases) updated from 2.10.1 to 2.11.0 .
Read more >How to solve the "is not a function" error in JavaScript
js we use require() to load external modules and files. This can cause, in some cases, an error like this: TypeError: require(...) is...
Read more >this.liboptions.parse is not a function - You.com - You.com
TypeError : this. libOptions. parse is not a function. Solution: Actually this issue is tracked at WEB-57089, Follow it for updates. It happens...
Read more >ESLint: TypeError: this.libOptions.parse is not a function | by ...
The error. TypeError: this.libOptions.parse is not a function at ESLint8Plugin.<anonymous> (C:\Program Files\JetBrains\WebStorm ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for report.
I confirmed it. I don’t know why, but it seems that cheerio is broken in your repository. Probably, it is related to yarn 2+ algorithm.
Run following script
and I get same error:
Perhaps updating cheerio might fix it #281
I remove https://github.com/island-is/island.is/blob/8476d6741c90742c531e5fe8654718f89d589d61/package.json#L454 and HonKit works. This
resolusion
affect HonKit’s dependencies.This issue is
resolusion
setting issue. https://yarnpkg.com/configuration/manifest/#resolutions