TypeError: cheerio is not a function
See original GitHub issueI’m trying out spectaql (0.2.0) for the first time, and I’m hitting the following error:
$ npx spectaql docs/spectaql.yml
COULD NOT LOAD EXAMPLE PROCESSOR
Running "sass:full" (sass) task
Running "sass:foundation" (sass) task
Running "concat:css" (concat) task
Running "cssmin:css" (cssmin) task
>> 1 file created. 140.88 kB → 121.62 kB
Running "concat:js" (concat) task
Running "uglify:js" (uglify) task
>> 1 file created 6.82 kB → 3 kB
Running "clean:html" (clean) task
>> 0 paths cleaned.
Running "compile-handlebars:compile" (compile-handlebars) task
Task error: [TypeError: cheerio is not a function
at Object.markdown (/Users/trobinson/fittfinder/fittfinder-service/node_modules/spectaql/app/lib/common.js:84:15)
I tried running npm i -D cheerio
, but got the same error. I’m running against a schema file:
introspection:
schemaFile: ./dist/schema.graphql
servers:
- url: https://example.com/graphql
description: Production
production: true
I tried with a trivial schema too, and got the same error:
schema {
query: Query
}
type Query {
test: Int
}
node/npm/OS version:
$ node -v
v12.18.4
$ npm -v
6.14.6
$ uname -v
Darwin Kernel Version 20.3.0: Thu Jan 21 00:07:06 PST 2021; root:xnu-7195.81.3~1/RELEASE_X86_64
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Task error: [TypeError: cheerio is not a function #36 - GitHub
it appears that the function cheerio() as defined in /usr/local/lib/node_modules/dociql/app/lib/common.js does not seem to have compatible ...
Read more >"TypeError: $ is not a function" when trying to use cheerio like ...
I know cheerio is installed and works as I have declared it with "const $ = require('cheerio');" and have been able to use...
Read more >Cheerio is not a function | Error Fixed | 100% Working | NPM
Hello, if you are getting cheerio is not a function error while using NPM then worry not, in this video I will show...
Read more >Having trouble $(...).each is not a function : r/javascript - Reddit
I'am doing something wrong ? My code: const fetch = require('node-fetch') const cheerio = require('cheerio') const getTravianTime = async ...
Read more >How to use not function in Cheerio - Tabnine
$elements .not((i, elem) => IGNORE_SELECTORS.some((selector) => $(elem).is(selector))) .each((i, elem) => { if (summary.length > SUMMARY_MAX_LENGTH) ...
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
Fix is in
0.2.1
available now. @benhicksonThanks @newhouse, can’t wait to try it out! Also, you’re a towel. 😂