question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

read property 'richText' of undefined

See original GitHub issue

After upgrading to Node.js v6.1.0 (from v5.7.1) the following code which previously worked fine:

   workbook.xlsx.writeFile("my.xlsx");

Causes the following error now:

Unhandled rejection TypeError: Cannot read property 'richText' of undefined
    at utils.inherits.write (C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xform\shared-string-xform.js:56:14)
    at C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xform\shared-strings-xform.js:102:10
    at Array.forEach (native)
    at Function._.each._.forEach (C:\Sandboxes\myproj\node_modules\underscore\underscore.js:78:11)
    at utils.inherits.write (C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xform\shared-strings-xform.js:101:7)
    at BaseXform.toXml (C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xform\base-xform.js:71:10)
    at xml (C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xform\base-xform.js:66:17)
    at C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xlsx.js:698:39
    at Promise._execute (C:\Sandboxes\myproj\node_modules\bluebird\js\release\debuggability.js:272:9)
    at Promise._resolveFromExecutor (C:\Sandboxes\myproj\node_modules\bluebird\js\release\promise.js:473:18)
    at new Promise (C:\Sandboxes\myproj\node_modules\bluebird\js\release\promise.js:77:14)
    at Object.XLSX.addSharedStrings (C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xlsx.js:697:14)
    at C:\Sandboxes\myproj\node_modules\exceljs\lib\xlsx\xlsx.js:942:16
    at tryCatcher (C:\Sandboxes\myproj\node_modules\bluebird\js\release\util.js:16:23)
    at Promise._settlePromiseFromHandler (C:\Sandboxes\myproj\node_modules\bluebird\js\release\promise.js:502:31)
    at Promise._settlePromise (C:\Sandboxes\myproj\node_modules\bluebird\js\release\promise.js:559:18)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
euqencommented, May 21, 2016

This bug is actual for some versions higher than 0.2.4.

0reactions
barbalexcommented, Sep 25, 2022

Got it: it happened because we accidentally passed a function instead of a value.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read properties of undefined (reading 'props') - Rich ...
I have normal string types in the Content model, but the last one is rich text. I'm going to add a card with...
Read more >
Rich Text Editor - The "Cannot read properties of undefined ...
Rich Text Editor - The "Cannot read properties of undefined (reading 'getParagraphMergedProperties')" error is thrown if the exportToBase64 ...
Read more >
Defending against - Cannot read property 'text' of undefined
I've recently shared my feelings that I really think prismic should change how they handle null values. Enhancement Request: Make fields that ...
Read more >
Cannot read property 'querySelector' of null for rich text editor ...
Cannot read property 'querySelector' of null for rich text editor when i resizing the screen. · Hi Goutham, · Greetings from Syncfusion support....
Read more >
Why am I getting this LWC error - Cannot read properties of ...
It looks to me like the error is there is an issue with a null value somewhere in one of the this.template.host.style lines....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found