ERROR operatorPackage[operator] is not a function
See original GitHub issueVersion
@nuxt/content: v1.9.0 nuxt: v2.14.7
Reproduction Link
https://github.com/sandoche/CuratedStack-nocode-template/tree/issue-nuxt-content
Steps to reproduce
- Clone https://github.com/sandoche/CuratedStack-nocode-template
- Go to branch
issue-nuxt-content - Run
npm run dev - Click on ‘Open source’ or ‘Productivity’
What is Expected?
To load the content.
What is actually happening?
ERROR operatorPackage[operator] is not a function 18:37:38
at result_set_ResultSet.find (node_modules\@lokidb\loki\lokidb.loki.js:1418:50)
at QueryBuilder.where (node_modules\@nuxt\content\lib\query-builder.js:73:29)
at node_modules\@nuxt\content\lib\middleware.js:107:19
Note that when you open the page in a new tab it does work. But when you click direcly it does not and give this error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
SML - Error: operator is not a function [tycon mismatch]
But I'm getting an error on sumDigits (factLarge 100) and I don't know how to fix it. 20.sml:8.19-11.26 Error: operator is not a...
Read more >TypeError: "x" is not a function - JavaScript - MDN Web Docs
The JavaScript exception "is not a function" occurs when there was an attempt to call a value from a function, but the value...
Read more >11 Debugging | Modern Statistics with R
If a function returns an error, it is not always clear where exactly the error occurred. Let's say that we want to compute...
Read more >Never use the Dot operator in JavaScript, for Data
Perhaps you're playing with some home automation script, and you type out a helper function for some data structure, like below. You know...
Read more >The Go Programming Language Specification
The text is not canonicalized, so a single accented code point is distinct ... There are four classes: identifiers, keywords, operators and ...
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 Free
Top 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

I’ve reproduced your issue and the problem is in your property name
categories_slugs. Underscore has special meaning innuxt/content’s.where()and it misunderstands your intention. If you renamecategories_slugsto anything without underscores, the problem goes away.Is this still an issue? Are you basically not able to use underscore characters in keys? Some CMS systems by default use underscore separated (snake case) keys for fields. If you can’t use
.where()to parse values with an underscore, that seems like a bug or worth mentioning in the docs.