是否有可能使用node.js从URL导入脚本?

我目前正在尝试从URL中导入我的一个脚本 ,但是require函数在这种情况下似乎不起作用。

var functionChecker = require("http://javascript-modules.googlecode.com/svn/functionChecker.js");

这是由这个脚本产生的错误信息摘录:

Error: Cannot find module 'http://javascript-modules.googlecode.com/svn/functionChecker.js'

有什么办法从node.js中的URL导入脚本?

我终于搞定了。 此示例下载文件http://javascript-modules.googlecode.com/svn/functionChecker.js ,然后将其保存在本地目录中。

 //var functionChecker = require(__dirname + '/functionChecker.js'); //functionChecker.checkAllFunctions(__filename); var http = require('http'); var fs = require('fs'); var google = http.createClient(80, 'www.google.com'); var request = google.request('GET', '/svn/functionChecker.js', {'host': 'javascript-modules.googlecode.com'}); request.end(); out = fs.createWriteStream('functionChecker.js'); request.on('response', function (response) { response.setEncoding('utf8'); response.on('data', function (chunk) { out.write(chunk); }); }); //function name: stuff //requires functions: false //is defined: false //description: blah blah woohoo.