Sono in esecuzione su Linux Mint 16 'petra' a 64 bit, e sto provando a usare 'phantomjs' per la prima volta, insieme al nodo js.Node js e phantomjs - Impossibile trovare il modulo 'debole'
phantomjs ho installato globalmente:
sudo npm install -g phantomjs
... e confermato che è in esecuzione (ho la richiesta phantomjs eseguendo "phantomjs" nel terminale)
e Ho installato il nodo modulo "fantasma" all'interno del mio progetto nodo:
npm install phantom
Fin qui tutto bene.
Tuttavia, nel mio codice dell'applicazione, non appena si tenta di eseguire questa linea:
var phantom = require('phantom');
... il programma si blocca con la seguente traccia:
Listening on port 3000 about to instantiate phantom module... module.js:333 throw err; ^ Error: Cannot find module 'weak' at Function.Module._resolveFilename (module.js:331:15) at Function.Module._load (module.js:273:25) at Module.require (module.js:357:17) at require (module.js:373:17) at new D (/home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/node_modules/dnode/index.js:28:20) at module.exports (/home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/node_modules/dnode/index.js:8:12) at /home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/phantom.js:135:13 at Server.handler (/home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/node_modules/shoe/index.js:22:9) at Server.EventEmitter.emit (events.js:104:17) at App.emit (/home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/node_modules/shoe/node_modules/sockjs/lib/sockjs.js:182:27) at Session.emit_open (/home/joe/Documents/My Stuff/Programming/Angular.js Projects/NodeJS Messing/FreeAgentScraper/node_modules/phantom/node_modules/shoe/node_modules/sockjs/lib/transport.js:107:23)
Posso confermare che in effetti non ci sono "weak.js" in nessun punto del progetto.
Ho eseguito 'npm install' per assicurare che tutte le dipendenze siano state installate.
La ricerca di Google non ha rivelato nulla di utile. Qualcuno può offrire qualche consiglio?
Infatti. Typo, mi dispiace. Dovresti leggere: 'sudo npm install -g phantomjs' (ora corretto in questione). – user2209634