jaystack / odata-v4-server-mssql-example

MSSQL example for odata-v4-server
6 stars 3 forks source link

Cannot read property 'highWaterMark' of undefined [odata-v4-server\build\lib\metadata.js:295:49] #3

Closed PetrSpacek closed 6 years ago

PetrSpacek commented 6 years ago

Hi I'm getting error when running the example ... node complains about uninitialized _this.writableState ihnerited by ODataServer from Duplex.

[my env] Windows_NT 10.0.17134 x64 node v10.6.0 npm v6.1.0

[steps] npm run build [SUCCESS] npm start [ERROR]

_stream_duplex.js:75
    return this._writableState.highWaterMark;
                               ^

TypeError: Cannot read property 'highWaterMark' of undefined
    at ODataServer.get (_stream_duplex.js:75:32)
    at propNames.forEach (C:\Users\Peter\odata4-playground\node_modules\odata-v4-server\build\lib\metadata.js:295:49)
    at Array.forEach (<anonymous>)
    at Object.createMetadataJSON (C:\Users\Peter\odata4-playground\node_modules\odata-v4-server\build\lib\metadata.js:294:15)
    at Function.$metadata (C:\Users\Peter\odata4-playground\node_modules\odata-v4-server\build\lib\server.js:187:137)
    at Function.document (C:\Users\Peter\odata4-playground\node_modules\odata-v4-server\build\lib\server.js:190:77)
    at Function.create (C:\Users\Peter\odata4-playground\node_modules\odata-v4-server\build\lib\server.js:234:19)
    at Object.<anonymous> (C:\Users\Peter\odata4-playground\lib\index.js:4:44)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
PleachiM commented 5 years ago

@PetrSpacek Do you remember how you have been able to fix this. Or are you using another library. This one seems to be unmaintained.

PetrSpacek commented 5 years ago

@PleachiM I remember, I was using the old version of the odata-v4-server (taken from the mssql example) ... the problem was disappeared, after updating to latest version (from this repo)

PleachiM commented 5 years ago

@PetrSpacek Thanks for the reply. I tried to update but I still got the error. Are you still using this? This module seems to be dead.

PetrSpacek commented 5 years ago

@PleachiM not really, i played with this as a part of technology research.