i.toFixed is not a function

52 views
Skip to first unread message

wyo...@gmail.com

unread,
Feb 2, 2021, 2:15:23 PM2/2/21
to cornerstone platform
Hi,

I am wondering if I have an issue with the version of nodejs.  My installation seems to go fine and I can access dcm4chee's study list okay.  However, when I try to view a study, I get the error:  

Something went wrong in ViewerMain
i.toFixed is not a function

Has anyone seen this?

I am building on CentOS 7 
dcm4chee archive light 5 (docker)
nodejs v12.20.1
yarn 1.22.5

Please let me know if I picked the wrong versions of something or other.

Thank you!

wyo...@gmail.com

unread,
Feb 8, 2021, 1:27:46 PM2/8/21
to cornerstone platform
In case anyone else runs into this and doesn't find the answer in Google (my case) immediately.  The answer can be found here:

Or you can simply do:

cd Viewers
sed -i 's/var wwwc = "W: ".concat(windowWidth.toFixed(0), " L: ").concat(windowCenter.toFixed(0));/var wwwc = "W: ".concat(Number(windowWidth).toFixed(0), " L: ").concat(Number(windowCenter).toFixed(0));/g' ./node_modules/react-cornerstone-viewport/dist/index.umd.js

Todd Jensen

unread,
Feb 9, 2021, 12:59:19 PM2/9/21
to cornerstone platform
Thank you for sharing the point to the issue and a fix! I've also been seeing this and hadn't found the root cause yet.
Reply all
Reply to author
Forward
0 new messages