Nicht finden kann-Modul "Webseite" bei der Verwendung von PhantomJS in MeteorJS

Ich bin mit der phantom npm-Paket über meteorhacks:npm Paket. Jedoch beim ausführen des basic-Phantomjs Beispiel unter Meteor.js ich bin immer der Cannot find 'webpage' Fehler.

Warum ist das passiert?

Code

var phantomjs = Meteor.npmRequire('phantom')
var page = Npm.require('webpage').create();
page.open('http://github.com/', function() {
    console.log('Page Loaded');
    phantom.exit();
});

Fehler

W20150305-02:16:51.629(-5)? (STDERR) Error: Cannot find module 'webpage'
W20150305-02:16:51.629(-5)? (STDERR)     at Function.Module._resolveFilename (module.js:338:15)
W20150305-02:16:51.629(-5)? (STDERR)     at Function.Module._load (module.js:280:25)
W20150305-02:16:51.629(-5)? (STDERR)     at Module.require (module.js:364:17)
W20150305-02:16:51.629(-5)? (STDERR)     at require (module.js:380:17)
W20150305-02:16:51.629(-5)? (STDERR)     at Object.Npm.require (/Users/username/Code/phantomtest/.meteor/local/build/programs/server/boot.js:129:18)
W20150305-02:16:51.629(-5)? (STDERR)     at app/server/phantom.js:8:16
W20150305-02:16:51.629(-5)? (STDERR)     at app/server/phantom.js:26:3
W20150305-02:16:51.629(-5)? (STDERR)     at /Users/username/Code/phantomtest/.meteor/local/build/programs/server/boot.js:205:10
W20150305-02:16:51.629(-5)? (STDERR)     at Array.forEach (native)
W20150305-02:16:51.630(-5)? (STDERR)     at Function._.each._.forEach (/Users/username/.meteor/packages/meteor-tool/.1.0.41.1f49rvw++os.osx.x86_64+web.browser+web.cordova/meteor-tool-os.osx.x86_64/dev_bundle/server-lib/node_modules/underscore/underscore.js:79:11)

Pakete.json

{
    "phantom": "0.7.2"
}
InformationsquelleAutor Nyxynyx | 2015-03-05
Schreibe einen Kommentar