wavded / ogre

ogr2ogr geojson-focused web client
http://ogre.adc4gis.com
MIT License
266 stars 79 forks source link

api-test ERROR #73

Closed illusion030 closed 5 years ago

illusion030 commented 5 years ago

After I use npm install ogre to install ogre, I go to ogre\test\ and run node api-test.js then I got an ERROR

node api-test.js version 13 # create server ok 1 is express ok 2 is http server # convert ok 3 responded ok 4 bad request when no file uploaded Error: Error: spawn ogr2ogr ENOENT at ChildProcess. (C:\Users\user\AppData\Roaming\npm\node_module s\ogre\node_modules\ogr2ogr\index.js:187:18) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Socket.stream.socket.on (internal/child_process.js:346:11) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at Pipe._handle.close [as _onclose] (net.js:557:12) (node:10084) [DEP0013] DeprecationWarning: Calling an asynchronous function with out callback is deprecated. C:\Users\user\AppData\Roaming\npm\node_modules\ogre\test\api-test.js:78 if (er) throw er ^ Error: expected 400 "Bad Request", got 500 "Internal Server Error" at Test._assertStatus (C:\Users\user\AppData\Roaming\npm\node_modules\ogre \node_modules\supertest\lib\test.js:268:12) at Test._assertFunction (C:\Users\user\AppData\Roaming\npm\node_modules\og re\node_modules\supertest\lib\test.js:283:11) at Test.assert (C:\Users\user\AppData\Roaming\npm\node_modules\ogre\node_m odules\supertest\lib\test.js:173:18) at localAssert (C:\Users\user\AppData\Roaming\npm\node_modules\ogre\node_m odules\supertest\lib\test.js:131:12) at C:\Users\user\AppData\Roaming\npm\node_modules\ogre\node_modules\supert est\lib\test.js:128:5 at Test.Request.callback (C:\Users\user\AppData\Roaming\npm\node_modules\o gre\node_modules\superagent\lib\node\index.js:728:3) at parser (C:\Users\user\AppData\Roaming\npm\node_modules\ogre\node_module s\superagent\lib\node\index.js:916:18) at IncomingMessage.res.on (C:\Users\user\AppData\Roaming\npm\node_modules\ ogre\node_modules\superagent\lib\node\parsers\json.js:19:7) at emitNone (events.js:111:20) at IncomingMessage.emit (events.js:208:7)

Why it responses 500 "Inernal Server Error" to me? I can't find where the error happened.

wavded commented 5 years ago

Looks like you don't have gdal installed (which provides the ogr2ogr command) or it isn't in the PATH. See:

https://github.com/wavded/ogre#requirements

illusion030 commented 5 years ago

Oh I forgot to install gdal. I fixed it after installed it. Thank you!

wavded commented 5 years ago

You're welcome!