-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nodejs wadoRs.js failing on Promise #1
Comments
What version of Node is this? Node should support Promises... |
Erik,
v8.11.3
Thanks for you quick response,
Robert
…On Wed, Aug 8, 2018 at 10:24 AM, Erik Ziegler ***@***.***> wrote:
What version of Node is this? Node should support Promises...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AmHCfGpre-nf3f2J8yVPFVtxm0YONC-Oks5uOvSIgaJpZM4V0AxQ>
.
|
Looks like we are using es6-promise package: https://github.com/brunoalvesdefaria/cornerstone-server-rendering/blob/master/src/wadoRs.js#L1 Did you run npm install? |
I reinstalled es6-promise and there is no error but it does not callBack
from loadImage, it hangs.
Also, in order to get to that point I had to add the following two lines:
const dicomParser = require ( 'dicom-parser');
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
Thanks
…On Wed, Aug 8, 2018 at 10:27 AM, Erik Ziegler ***@***.***> wrote:
Looks like we are using es6-promise package: https://github.com/
brunoalvesdefaria/cornerstone-server-rendering/blob/master/
src/wadoRs.js#L1
Did you run npm install?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AmHCfIjrsL-6ker5JmGxBj38CEHClHp2ks5uOvVlgaJpZM4V0AxQ>
.
|
Also, I am using the node branch.
Will try the master version.
Thanks
On Wed, Aug 8, 2018 at 10:38 AM, Robert Klajbor <
[email protected]> wrote:
… I reinstalled es6-promise and there is no error but it does not callBack
from loadImage, it hangs.
Also, in order to get to that point I had to add the following two lines:
const dicomParser = require ( 'dicom-parser');
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
Thanks
On Wed, Aug 8, 2018 at 10:27 AM, Erik Ziegler ***@***.***>
wrote:
> Looks like we are using es6-promise package:
> https://github.com/brunoalvesdefaria/cornerstone-server-
> rendering/blob/master/src/wadoRs.js#L1
>
> Did you run npm install?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AmHCfIjrsL-6ker5JmGxBj38CEHClHp2ks5uOvVlgaJpZM4V0AxQ>
> .
>
|
Erik,
The master branch does not support node, which is what I need.
Here is the latest test with the node branch ( with global.Promise =
require('es6-promise'); - latest npm install )
Thanks again,
Robert
dicomweb:http://localhost:8000/image.dcm
TypeError: Promise is not a constructor
xhrRequest.js:9
at t.default
(/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:39535)
at Object.load
(/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:7370)
at t.loadImage
(/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:18659)
at s
(/Users/robertklajbor/node_modules/cornerstone-core/dist/cornerstone.min.js:2:78829)
at Object.t.loadImage
(/Users/robertklajbor/node_modules/cornerstone-core/dist/cornerstone.min.js:2:78160)
at loadAndViewImage
(/Users/robertklajbor/Documents/GradientQuestions/Question1/SendReportImage/SendReportImage_server.js:180:21)
at Object.saySendReportImage
(/Users/robertklajbor/Documents/GradientQuestions/Question1/SendReportImage/SendReportImage_server.js:230:5)
at Object.wrapper [as func]
(/Users/robertklajbor/node_modules/lodash/lodash.js:4949:19)
at /Users/robertklajbor/node_modules/grpc/src/server.js:592:13
On Wed, Aug 8, 2018 at 10:40 AM, Robert Klajbor <
[email protected]> wrote:
… Also, I am using the node branch.
Will try the master version.
Thanks
On Wed, Aug 8, 2018 at 10:38 AM, Robert Klajbor <
***@***.***> wrote:
> I reinstalled es6-promise and there is no error but it does not callBack
> from loadImage, it hangs.
>
> Also, in order to get to that point I had to add the following two lines:
>
> const dicomParser = require ( 'dicom-parser');
>
> cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
>
> Thanks
>
>
>
> On Wed, Aug 8, 2018 at 10:27 AM, Erik Ziegler ***@***.***>
> wrote:
>
>> Looks like we are using es6-promise package:
>> https://github.com/brunoalvesdefaria/cornerstone-server-rend
>> ering/blob/master/src/wadoRs.js#L1
>>
>> Did you run npm install?
>>
>> —
>> You are receiving this because you authored the thread.
>> Reply to this email directly, view it on GitHub
>> <#1 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/AmHCfIjrsL-6ker5JmGxBj38CEHClHp2ks5uOvVlgaJpZM4V0AxQ>
>> .
>>
>
>
|
Erik,
All problems resolved.
Fixed by using the version of cornerstoneWADOImageLoader included in the
node branch of the repository.
I am implementing this in a grpc service and it was necessary to comment
out the line "global.Promise = require('es6-promise');" .
Also, as stated previously the lines were add for the dicom-parser:
const dicomParser = require ( 'dicom-parser');
cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
Thanks for your help and wish to commend the authors of this work for a
great job.
Regards,
Robert
On Wed, Aug 8, 2018 at 12:09 PM, Robert Klajbor <
[email protected]> wrote:
… Erik,
The master branch does not support node, which is what I need.
Here is the latest test with the node branch ( with global.Promise =
require('es6-promise'); - latest npm install )
Thanks again,
Robert
dicomweb:http://localhost:8000/image.dcm
TypeError: Promise is not a constructor
xhrRequest.js:9
at t.default (/Users/robertklajbor/node_modules/cornerstone-wado-
image-loader/dist/cornerstoneWADOImageLoader.min.js:2:39535)
at Object.load (/Users/robertklajbor/node_modules/cornerstone-wado-
image-loader/dist/cornerstoneWADOImageLoader.min.js:2:7370)
at t.loadImage (/Users/robertklajbor/node_modules/cornerstone-wado-
image-loader/dist/cornerstoneWADOImageLoader.min.js:2:18659)
at s (/Users/robertklajbor/node_modules/cornerstone-core/dist/
cornerstone.min.js:2:78829)
at Object.t.loadImage (/Users/robertklajbor/node_
modules/cornerstone-core/dist/cornerstone.min.js:2:78160)
at loadAndViewImage (/Users/robertklajbor/Documents/GradientQuestions/
Question1/SendReportImage/SendReportImage_server.js:180:21)
at Object.saySendReportImage (/Users/robertklajbor/
Documents/GradientQuestions/Question1/SendReportImage/
SendReportImage_server.js:230:5)
at Object.wrapper [as func] (/Users/robertklajbor/node_
modules/lodash/lodash.js:4949:19)
at /Users/robertklajbor/node_modules/grpc/src/server.js:592:13
On Wed, Aug 8, 2018 at 10:40 AM, Robert Klajbor <
***@***.***> wrote:
> Also, I am using the node branch.
>
> Will try the master version.
>
> Thanks
>
>
> On Wed, Aug 8, 2018 at 10:38 AM, Robert Klajbor <
> ***@***.***> wrote:
>
>> I reinstalled es6-promise and there is no error but it does not
>> callBack from loadImage, it hangs.
>>
>> Also, in order to get to that point I had to add the following two lines:
>>
>> const dicomParser = require ( 'dicom-parser');
>>
>> cornerstoneWADOImageLoader.external.dicomParser = dicomParser;
>>
>> Thanks
>>
>>
>>
>> On Wed, Aug 8, 2018 at 10:27 AM, Erik Ziegler ***@***.***>
>> wrote:
>>
>>> Looks like we are using es6-promise package:
>>> https://github.com/brunoalvesdefaria/cornerstone-server-rend
>>> ering/blob/master/src/wadoRs.js#L1
>>>
>>> Did you run npm install?
>>>
>>> —
>>> You are receiving this because you authored the thread.
>>> Reply to this email directly, view it on GitHub
>>> <#1 (comment)>,
>>> or mute the thread
>>> <https://github.com/notifications/unsubscribe-auth/AmHCfIjrsL-6ker5JmGxBj38CEHClHp2ks5uOvVlgaJpZM4V0AxQ>
>>> .
>>>
>>
>>
>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bruno,
Good day.
When trying to run the node version of wadoRs.js the following promise related error was incurred:
TypeError: Promise is not a constructor
Any help would be most appreciated.
Thanks,
Robert
node ./src/wadoRs.js
dicomweb:http://localhost:8000/image.dcm
/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("cornerstoneWADOImageLoader",[],t):"object"==typeof exports?exports.cornerstoneWADOImageLoader=t():e.cornerstoneWADOImageLoader=t()}(this,function(){return function(e){var t={};function r(a){if(t[a])return t[a].exports;var n=t[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,a){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:a})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=63)}([function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=r(56),o=(a=n
TypeError: Promise is not a constructor
at t.default (/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:39535)
at Object.load (/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:7370)
at t.loadImage (/Users/robertklajbor/node_modules/cornerstone-wado-image-loader/dist/cornerstoneWADOImageLoader.min.js:2:18659)
at s (/Users/robertklajbor/node_modules/cornerstone-core/dist/cornerstone.min.js:2:78829)
at Object.t.loadImage (/Users/robertklajbor/node_modules/cornerstone-core/dist/cornerstone.min.js:2:78160)
at loadAndViewImage (/Users/robertklajbor/Documents/GradientQuestions/cornerstone-server-rendering-node/src/wadoRs.js:142:17)
at Object. (/Users/robertklajbor/Documents/GradientQuestions/cornerstone-server-rendering-node/src/wadoRs.js:192:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
The text was updated successfully, but these errors were encountered: