Hi Chamila,
Perhaps I can help on the Node.js front.
I assume you are you working with the trunk, and if so:
You do not want to npm install any part of thrift. Running npm install
thrift will install the latest published branch of thrift for Node.js,
which is 0.9.1 right now. Because the tests in the trunk are designed to
test all of the new features in the trunk, the trunk tests will fail
against the older published thrift code. Also you should never need to
npm install anything but "thrift". The components of thrift for node.js
are all installed as a group and not meant to be individually installed
(i.e. thrift/transport is not supported).
To test against the trunk "make check" in thrift/lib/nodejs runs "npm
test" which reads the package.json and runs the test script which is
thrift/lib/nodejs/test/testAll.sh. In order for the tests to find thrift
the thrift/lib/nodejs/lib directory is added to the NODE_PATH. This
avoids the need for an "npm install thrift", and allows us to test the
trunk version of the Node.js thrift library.
You will need to make/install the thrift compiler prior to running the
Node.js tests because the check needs to compile the ThriftTest.thrift
for Node.js.
The cross language tests (/thrift/test/test.sh executed by "make cross")
use the same approach to locate the thrift libs. From thrift/test/test.sh:
...
NODE_TEST_DIR=${BASEDIR}/../bin/nodejs/tests
export NODE_PATH=${NODE_TEST_DIR}:${NODE_TEST_DIR}/../lib:${NODE_PATH}
...
Any npm install activity you see during the test process is to install
node.js support libs (like q for instance), not thrift itself.
Feel free to shoot me a direct email if this does not get you on the
right track.
Best,
Randy
On 3/27/2014 11:35 AM, Chamila Wijayarathna wrote:
Hi Jake,
I tried that, but still getting the same result.
chamila@chamila-Dell-System-Vostro-3450:~/GSoC/thrift$ sudo npm config set
registry http://registry.npmjs.org/
chamila@chamila-Dell-System-Vostro-3450:~/GSoC/thrift$ sudo npm install
thrift/transport
npm ERR! Could not install: thrift/transport
npm ERR! Error: ENOENT, stat 'thrift/transport'
npm ERR! You may report this log at:
npm ERR! <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR! reportbug --attach /home/chamila/GSoC/thrift/npm-debug.log npm
npm ERR!
npm ERR! System Linux 3.8.0-19-generic
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
"thrift/transport"
npm ERR! cwd /home/chamila/GSoC/thrift
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.4
npm ERR! path thrift/transport
npm ERR! code ENOENT
npm ERR! message ENOENT, stat 'thrift/transport'
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/chamila/GSoC/thrift/npm-debug.log
npm not ok
Can you send me the patch file, so I can try if it is working?
Thank You!
On Fri, Mar 28, 2014 at 12:00 AM, Jake Farrell <[email protected]> wrote:
Run the following before npm install, I ran into this issue as well when
testing the vagrant image, I have a patch for it which I have not committed
yet
sudo npm config set registry http://registry.npmjs.org/
-Jake
On Thu, Mar 27, 2014 at 2:20 PM, Chamila Wijayarathna <
[email protected]> wrote:
Hello all,
I trying to run sample nodejs severs and clients in lib/nodejs folder.
But
when I tried to run them I am getting following error.
*chamila@chamila-Dell-System-Vostro-3450:~/GSoC/thrift$ nodejs
lib/nodejs/test/client.js -p binary -t buffered *
*module.js:337*
* throw new Error("Cannot find module '" + request + "'");*
* ^*
*Error: Cannot find module 'thrift/transport'*
* at Function._resolveFilename (module.js:337:11)*
* at Function._load (module.js:279:25)*
* at Module.require (module.js:359:17)*
* at require (module.js:375:17)*
* at Object.<anonymous>
(/home/chamila/GSoC/thrift/lib/nodejs/test/client.js:27:24)*
* at Module._compile (module.js:446:26)*
* at Object..js (module.js:464:10)*
* at Module.load (module.js:353:32)*
* at Function._load (module.js:311:12)*
* at Array.0 (module.js:484:10)*
I tried to install thrift/transport using npm, but it didn't work either.
*chamila@chamila-Dell-System-Vostro-3450:~/GSoC/thrift$ sudo npm install
thrift/transport*
*[sudo] password for chamila: *
*npm ERR! Could not install: thrift/transport*
*npm ERR! Error: ENOENT, stat 'thrift/transport'*
*npm ERR! You may report this log at:*
*npm ERR! <http://bugs.debian.org/npm <http://bugs.debian.org/npm>>*
*npm ERR! or use*
*npm ERR! reportbug --attach /home/chamila/GSoC/thrift/npm-debug.log
npm*
*npm ERR! *
*npm ERR! System Linux 3.8.0-19-generic*
*npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install"
"thrift/transport"*
*npm ERR! cwd /home/chamila/GSoC/thrift*
*npm ERR! node -v v0.6.19*
*npm ERR! npm -v 1.1.4*
*npm ERR! path thrift/transport*
*npm ERR! code ENOENT*
*npm ERR! message ENOENT, stat 'thrift/transport'*
*npm ERR! errno {}*
*npm ERR! *
*npm ERR! Additional logging details can be found in:*
*npm ERR! /home/chamila/GSoC/thrift/npm-debug.log*
*npm not ok*
What should I do for this?
--
*Chamila Dilshan Wijayarathna,*
SMIEEE, SMIESL,
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa.