UnhandledPromiseRejectionWarning: TypeError: Cannot convert object to primitive value
See original GitHub issueWhat did you do
Running as NPM script:
jsonschema2md -o docs/ -x docs/ -d schemas/ -e json
What did you expect to happen
No warnings of unhandled promise rejections.
What happened
Note: I reference unloaded JSON schemas of another project.
(node:23354) UnhandledPromiseRejectionWarning: TypeError: Cannot convert object to primitive value
    at makeconstraintssection (/Users/axawinterthur/dev/aletheia/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:590:33)
    at Object.entries.map (/Users/axawinterthur/dev/aletheia/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:715:14)
    at Array.map (<anonymous>)
    at makeproplist (/Users/axawinterthur/dev/aletheia/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:705:54)
    at makeproperties (/Users/axawinterthur/dev/aletheia/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:819:12)
    at foldl (/Users/axawinterthur/dev/aletheia/node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:843:10)
    at each (/Users/axawinterthur/dev/aletheia/node_modules/ferrum/src/sequence.js:984:12)
    at curry (/Users/axawinterthur/dev/aletheia/node_modules/ferrum/src/sequence.js:582:5)
    at each [CURRY] (/Users/axawinterthur/dev/aletheia/node_modules/ferrum/src/functional.js:169:12)
    at curry (/Users/axawinterthur/dev/aletheia/node_modules/ferrum/src/sequence.js:983:3)
(node:23354) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23354) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
What’s your environment
- Operating System: macOS Catalina 
10.15.2 (19C57) - node.js version: 
v10.15.0 
Do you have example files:
Sorry, not publicly available for this.
I have the full log only:
> jsonschema2md -o docs/ -x docs/ -d schemas/ -e json
loading 53 schemas
cannot resolve http://jsonlogic.com/schemas/json-logic.json
cannot resolve http://jsonlogic.com/schemas/json-logic.json
writing schemas
writing schemas to .../docs
writing README
building readme
writing documentation
generating markdown
(node:23354) UnhandledPromiseRejectionWarning: TypeError: Cannot convert object to primitive value
    at makeconstraintssection (.../node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:590:33)
    at Object.entries.map (.../node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:715:14)
    at Array.map (<anonymous>)
    at makeproplist (.../node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:705:54)
    at makeproperties (.../node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:819:12)
    at foldl (.../node_modules/@adobe/jsonschema2md/lib/markdownBuilder.js:843:10)
    at each (.../node_modules/ferrum/src/sequence.js:984:12)
    at curry (.../node_modules/ferrum/src/sequence.js:582:5)
    at each [CURRY] (.../node_modules/ferrum/src/functional.js:169:12)
    at curry (.../node_modules/ferrum/src/sequence.js:983:3)
(node:23354) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23354) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
.../docs/README.md created
Issue Analytics
- State:
 - Created 4 years ago
 - Comments:5 (2 by maintainers)
 
Top Results From Across the Web
Cannot convert object to primitive value - Stack Overflow
most of the Javascript objects have toString() method inherited from Object.prototype . but some of them that have a null prototype , not...
Read more >Uncaught TypeError: Cannot convert object to primitive value ...
I'm seeing the following error upgrading from 2.9 to 2.11.0: Uncaught TypeError: Cannot convert object to primitive value toString is being ...
Read more >Cannot convert object to primitive value | The Node.js Master ...
Your browser can't play this video. ... Bonus Lecture - TypeError : Cannot convert object to primitive value | The Node.js Master Class....
Read more >error typeerror: cannot convert object to primitive value
What's causing this error-message in general is that the system tries to convert some object to a string but can not produce a...
Read more >Cannot convert object to primitive value with imported ... - Morioh
I'm trying to dynamically build a vuetify component in a nuxt project (Using different text values with vuetify component) by importing and iterating...
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

Yes, that’s exactly what’s happening. I can fix this.
@trieloff Thanks again for your quick help.
I have more output now, though another unhandled promise rejection. We use other keywords as keys too, e.g. object type
propertiesor array typeitemskeywords, but those are all not primitives… 🤔