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.

XLSX works with node-debug but not node

See original GitHub issue

Not sure what I’m doing wrong! I have this simple test.js in the root folder:

var XLSX = require('xlsx');
console.log(XLSX)
var xlsx = XLSX.readFile("test.xlsx");
console.log(xlsx)

If I run node-debug test.js it runs to completion as expected. But if I run node test.js execution terminates inside of XLSX.readFile(). in fact, if I insert a probe, that probe is never reached:

function readFileSync(data, opts) {
    console.log(data, opts)
    var o = opts||{}; o.type = 'file';
    return readSync(data, o);
}

If I trace execution with node-debug, all works as expected.

Windows 7 Node v0.10.31 Excel 2010

I can’t attach test.xlsx but here is the corresponding CSV, just one column, one row:

x

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
johnyesbergcommented, Sep 16, 2014

There are known problems with Node 0.10.31. Try 0.10.30

0reactions
SheetJSDevcommented, Sep 16, 2014

@smohandas the XLSX issue is rooted in an issue from the zip dependency. See https://github.com/Stuk/jszip/issues/166 for more info

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to read excel data in node.js - Stack Overflow
Try debugger and check & resolve the value of it. Share.
Read more >
Reading Excel file using node js | Edureka Community
Data and styles from spreadsheets can be read, edited, and written to XLSX and JSON. It is an ongoing project. The most recent...
Read more >
The World of Node.js on IBM i - Scott Klement's
Declaring and Comparing. • declare a variable with var (alternatives: const, let). • type of variable is determine by what is assigned to...
Read more >
How To Read An Excel File In Node.js - In Plain English
Modify your code to verify we are getting the data from the file. ... Run this in debug mode, **F5, **and then run...
Read more >
Office Add-ins with Visual Studio Code
If you are using Node.js or ASP.NET Core for server-side logic to support your Office Add-in, refer to the Debugging page to configure...
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