TypeError: this._options.handleDate is not a function
See original GitHub issueExporting an object with a Date
throws an error TypeError: this._options.handleDate is not a function
when it should be exported as a local date format as the default handleDate
function is implemented:
Minimal reproduction
import * as jsonexport from 'jsonexport';
const obj: object = {
firstname: "Guillaume",
lastname: "Ongenae",
height: 187,
birth: new Date("01/16/1994"),
};
jsonexport(obj)
.then(console.log)
.catch(console.error);
Error trace - Actual output
❯ ts-node index.ts
TypeError: this._options.handleDate is not a function
at Handler.checkComplex (/Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/parser/handler.js:46:30)
at Handler.check (/Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/parser/handler.js:96:17)
at Parser._parseObject (/Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/parser/csv.js:159:35)
at Parser.parse (/Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/parser/csv.js:34:60)
at /Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/index.js:76:12
at new Promise (<anonymous>)
at module.exports (/Users/guillaume/Documents/try/csv/node_modules/jsonexport/lib/index.js:75:10)
at Object.<anonymous> (/Users/guillaume/Documents/try/csv/index.ts:10:1)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1043:23)
Example output without Date
Just for reference
❯ ts-node index.ts
firstname,Guillaume
lastname,Ongenae
height,187
Versions
- ts-node: v9.0.0
- nodejs: 14.13.1
- jsonexport: v3.0.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Select2: Uncaught TypeError: options.results is not a function
1 Answer 1 · Hi . · I am not trying to change the code for the plugin ... but I did just...
Read more >Uncaught TypeError: options.results is not a function #3728
I am receiving this error: Uncaught TypeError: options.results is not a function Here is my HTML: Here i...
Read more >Squel.js - SQL query string builder for Javascript - Hiddentao
It is this method which constructs the final query string. Squel does not check to see if your final query is semantically correct...
Read more >Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >Mobiscroll getting started guide for plain JS, jQuery, Angular ...
$(function () { // create a datepicker with default settings ... so the DOM ready event is not as useful, as it only...
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
Not at all, I just waited a few hours. Thank you for your work!
sorry for the delay, i just published v3.1.0 @gregz07