thejinx0r
thejinx0r

Reputation: 471

How do I access node.js' filesystem from meteor?

I'm really new to meteor and node.js and I think it's really awesome!

So the issue I am having is that I cannot access node's filesystem module from meteor. On stackoverflow, other users have reported that they use

var require = __meteor_bootstrap__.require;
var fs = require('fs');

However, when I call it, I get this error:

TypeError: undefined is not a function

I followed this this question's answer and I don't know what to do from here. I have made sure that the code above is located in the startup portion of the server.

Upvotes: 0

Views: 734

Answers (1)

matb33
matb33

Reputation: 2830

As of Meteor 0.6.0, it would be:

var fs = Npm.require("fs");

Upvotes: 7

Related Questions