Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Doc example fails in Node.js #200

Open
mhkeller opened this issue May 24, 2013 · 6 comments
Open

Google Doc example fails in Node.js #200

mhkeller opened this issue May 24, 2013 · 6 comments

Comments

@mhkeller
Copy link

When I run the example at http://misoproject.com/dataset/tutorials/googlespreadsheets in node after doing var Miso = require('miso.dataset') I get the following error in my console

/Users/mike/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2324
    var head    = document.head ||
                  ^
ReferenceError: document is not defined
    at Function.Dataset.Xhr.getJSONP (/Users/mike/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2324:19)
    at Function.Dataset.Xhr (/Users/mike/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2272:21)
    at _.extend.fetch (/Users/mike/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2242:15)
    at _.extend.fetch (/Users/mike/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:1029:21)
    at Object.<anonymous> (/Users/mike/code/gdoc-to-s3/miso.js:10:4)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
@alexgraul
Copy link
Member

Interesting, that should be using request, will take a poke.

@iwoj
Copy link

iwoj commented Jun 24, 2013

Is there a fix for this? Miso doesn't seem to work with Node.js anymore.

@iwoj
Copy link

iwoj commented Jul 17, 2013

This is super annoying.

@mhkeller
Copy link
Author

mhkeller commented Aug 2, 2013

Any progress on this? I'd love to be able to start using Miso in my node projects.

@mhilland
Copy link

I'm experiencing the exact same issue. I can fetch and return data perfectly fine when creating my own array of objects inside Miso.Dataset, but when I try to specify a Google document via Miso.Dataset.Importers.GoogleSpreadsheet and Miso.Dataset.Parsers.GoogleSpreadsheet, it returns with this error:

/Applications/MAMP/htdocs/LB-BNR/meteor-aldoemail/.meteor/local/build/programs/server/boot.js:186
}).run();
^
ReferenceError: document is not defined
at Function.Dataset.Xhr.getJSONP (/Users/Max/.meteorite/packages/npm/arunoda/meteor-npm/177ab6118de5bf8cffb19481343d5762ff7a2aaf/.build/npm/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2324:19)
at Function.Dataset.Xhr (/Users/Max/.meteorite/packages/npm/arunoda/meteor-npm/177ab6118de5bf8cffb19481343d5762ff7a2aaf/.build/npm/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2272:21)
at .extend.fetch (/Users/Max/.meteorite/packages/npm/arunoda/meteor-npm/177ab6118de5bf8cffb19481343d5762ff7a2aaf/.build/npm/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:2242:15)
at .extend.fetch (/Users/Max/.meteorite/packages/npm/arunoda/meteor-npm/177ab6118de5bf8cffb19481343d5762ff7a2aaf/.build/npm/node_modules/miso.dataset/dist/node/miso.ds.deps.0.4.1.js:1029:21)
at app/meteor-aldoemail.js:25:6
at app/meteor-aldoemail.js:48:3
at /Applications/MAMP/htdocs/LB-BNR/meteor-aldoemail/.meteor/local/build/programs/server/boot.js:155:10
at Array.forEach (native)
at Function.
.each.
.forEach (/Users/Max/.meteor/tools/c2a0453c51/lib/node_modules/underscore/underscore.js:79:11)
at /Applications/MAMP/htdocs/LB-BNR/meteor-aldoemail/.meteor/local/build/programs/server/boot.js:82:5
=> Exited with code: 8
=> Your application is crashing. Waiting for file change.

@oa495
Copy link

oa495 commented Nov 22, 2017

any update on this? does using node.js still work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants