Skip to content
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

Open
RobertVirtualis opened this issue Aug 8, 2018 · 7 comments
Open

nodejs wadoRs.js failing on Promise #1

RobertVirtualis opened this issue Aug 8, 2018 · 7 comments

Comments

@RobertVirtualis
Copy link

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)

@swederik
Copy link
Collaborator

swederik commented Aug 8, 2018

What version of Node is this? Node should support Promises...

@RobertVirtualis
Copy link
Author

RobertVirtualis commented Aug 8, 2018 via email

@swederik
Copy link
Collaborator

swederik commented Aug 8, 2018

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?

@RobertVirtualis
Copy link
Author

RobertVirtualis commented Aug 8, 2018 via email

@RobertVirtualis
Copy link
Author

RobertVirtualis commented Aug 8, 2018 via email

@RobertVirtualis
Copy link
Author

RobertVirtualis commented Aug 8, 2018 via email

@RobertVirtualis
Copy link
Author

RobertVirtualis commented Aug 9, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants