You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the latest Node.js (v0.12.0) to run the unit test cases by make server, but it report an exception, then I changed to Node.js (v0.10.0), when using make server, it still report an exception.
The following is detailed information.
When using Node.js v0.10.0:
make server run, but when open the link by browser it will report an excepiton.
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ node -v
v0.10.0
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make test
Starting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:~/WeiSONG/work/lunr.js/lunr.js$ make server
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32
exists(path, function(exists){
^
TypeError: undefined is not a function
at Server. (/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32:3)
at Server.emit (events.js:110:17)
at HTTPParser.parserOnIncoming as onIncoming
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at Socket.socketOnData (_http_server.js:343:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:529:20)
make: *** [server] Error 1
Then I changed to Node.js v0.12.0, make server runs, but when open the link in browser, it report an exception:
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ nvm use system
Now using system version of node: v0.12.0.
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ node -v
v0.12.0
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make test
Starting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make server
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32
exists(path, function(exists){
^
TypeError: undefined is not a function
at Server. (/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32:3)
at Server.emit (events.js:110:17)
at HTTPParser.parserOnIncoming as onIncoming
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at Socket.socketOnData (_http_server.js:343:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:529:20)
make: *** [server] Error 1
Then, I looked the documents of Node.js, it seems that from some specified version, 'exists' function is remove from 'path' module, and moved to 'file' module.
Then, I modified the code in "server.js", it works for Node.js v0.12.0:
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ node -v
v0.12.0
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make server
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
GET /test/env/jquery.js
GET /test/env/augment.min.js
GET /test/env/qunit.js
GET /test/env/qunit.css
GET /lib/lunr.js
GET /lib/utils.js
GET /lib/tokenizer.js
GET /lib/pipeline.js
GET /lib/vector.js
GET /lib/sorted_set.js
GET /lib/event_emitter.js
.....
And, it alsl work in Node.js v0.10.0:
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ nvm use 0.10.0
Now using node v0.10.0
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ node -v
v0.10.0
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make test
Starting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:/WeiSONG/work/lunr.js/lunr.js$ make server
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
GET /test/env/jquery.js
GET /test/env/augment.min.js
GET /test/env/qunit.js
GET /test/env/qunit.css
GET /lib/lunr.js
GET /lib/utils.js
GET /lib/tokenizer.js
The text was updated successfully, but these errors were encountered:
I'm using the latest Node.js (v0.12.0) to run the unit test cases by make server, but it report an exception, then I changed to Node.js (v0.10.0), when using make server, it still report an exception.
The following is detailed information.
make server run, but when open the link by browser it will report an excepiton.
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ node -v/WeiSONG/work/lunr.js/lunr.js$ make testv0.10.0
songwei@songwei-ThinkPad-T410:
Starting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:~/WeiSONG/work/lunr.js/lunr.js$ make server
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32
exists(path, function(exists){
^
TypeError: undefined is not a function
at Server. (/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32:3)
at Server.emit (events.js:110:17)
at HTTPParser.parserOnIncoming as onIncoming
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at Socket.socketOnData (_http_server.js:343:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:529:20)
make: *** [server] Error 1
Then I changed to Node.js v0.12.0, make server runs, but when open the link in browser, it report an exception:
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ nvm use system/WeiSONG/work/lunr.js/lunr.js$ node -vNow using system version of node: v0.12.0.
songwei@songwei-ThinkPad-T410:
v0.12.0
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ make test/WeiSONG/work/lunr.js/lunr.js$ make serverStarting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32
exists(path, function(exists){
^
TypeError: undefined is not a function
at Server. (/home/songwei/WeiSONG/work/lunr.js/lunr.js/server.js:32:3)
at Server.emit (events.js:110:17)
at HTTPParser.parserOnIncoming as onIncoming
at HTTPParser.parserOnHeadersComplete (_http_common.js:111:23)
at Socket.socketOnData (_http_server.js:343:22)
at Socket.emit (events.js:107:17)
at readableAddChunk (_stream_readable.js:163:16)
at Socket.Readable.push (_stream_readable.js:126:10)
at TCP.onread (net.js:529:20)
make: *** [server] Error 1
Then, I looked the documents of Node.js, it seems that from some specified version, 'exists' function is remove from 'path' module, and moved to 'file' module.
Then, I modified the code in "server.js", it works for Node.js v0.12.0:
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ node -v/WeiSONG/work/lunr.js/lunr.js$ make serverv0.12.0
songwei@songwei-ThinkPad-T410:
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
GET /test/env/jquery.js
GET /test/env/augment.min.js
GET /test/env/qunit.js
GET /test/env/qunit.css
GET /lib/lunr.js
GET /lib/utils.js
GET /lib/tokenizer.js
GET /lib/pipeline.js
GET /lib/vector.js
GET /lib/sorted_set.js
GET /lib/event_emitter.js
.....
And, it alsl work in Node.js v0.10.0:
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ nvm use 0.10.0/WeiSONG/work/lunr.js/lunr.js$ node -vNow using node v0.10.0
songwei@songwei-ThinkPad-T410:
v0.10.0
songwei@songwei-ThinkPad-T410:
/WeiSONG/work/lunr.js/lunr.js$ make test/WeiSONG/work/lunr.js/lunr.js$ make serverStarting test server at http://localhost:32423
Took 74ms to run 301 tests. 301 passed, 0 failed.
songwei@songwei-ThinkPad-T410:
/usr/local/bin/node server.js 3000
Server listening on 3000
GET /test
GET /test/env/jquery.js
GET /test/env/augment.min.js
GET /test/env/qunit.js
GET /test/env/qunit.css
GET /lib/lunr.js
GET /lib/utils.js
GET /lib/tokenizer.js
The text was updated successfully, but these errors were encountered: