saveAs in Meteor demo causes an error "Exception in delivering result of invoking 'download': " #751

Closed
opened 2017-07-28 01:04:12 +00:00 by NorthDecoder · 1 comment
NorthDecoder commented 2017-07-28 01:04:12 +00:00 (Migrated from github.com)

While testing with Firefox browser v54.0.1, in the meteor demo on line 39 of client/main.js 🔗 the saveAs call is causing an error, because it seems to be undefined.

If I add to file package.json dependencies:
"file-saver": "1.3.3"

and add somewhere near to the top of the file main.js:
const FILESAVER = require('file-saver');

then change at line 39 of main.js
from: saveAs(
to: FILESAVER.saveAs(...

The errors go away and the file save as dialog appears as expected.

While testing with Firefox browser v54.0.1, in the meteor demo on line 39 of client/main.js [:link:](https://github.com/SheetJS/js-xlsx/blob/master/demos/meteor/client/main.js#L39) the saveAs call is causing an error, because it seems to be undefined. If I add to file `package.json` dependencies: ` "file-saver": "1.3.3" ` and add somewhere near to the top of the file `main.js`: ` const FILESAVER = require('file-saver'); ` then change at line 39 of `main.js` from: ` saveAs( ` to: ` FILESAVER.saveAs(... ` The errors go away and the file save as dialog appears as expected.
SheetJSDev commented 2017-07-28 01:24:57 +00:00 (Migrated from github.com)

The Makefile for the demo installs the pfafman:filesaver wrapper. Can you try the following steps from a fresh clone of the repo and see if you still see the error:

cd demos/meteor
meteor create .
npm install babel-runtime meteor-node-stubs xlsx
meteor add pfafman:filesaver
meteor

Not too familiar with meteor, but assumably meteor add performs some magic.

Those lines probably should be mentioned in the README (PR welcome :)

The [Makefile for the demo](https://github.com/SheetJS/js-xlsx/blob/master/demos/meteor/Makefile#L8) installs the [`pfafman:filesaver` wrapper](https://atmospherejs.com/pfafman/filesaver). Can you try the following steps from a fresh clone of the repo and see if you still see the error: ```bash cd demos/meteor meteor create . npm install babel-runtime meteor-node-stubs xlsx meteor add pfafman:filesaver meteor ``` Not too familiar with meteor, but assumably `meteor add` performs some magic. Those lines probably should be mentioned in the README (PR welcome :)
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sheetjs/sheetjs#751
No description provided.