epam / mriviewer

MRI Viewer is a high performance web tool for advanced 2-D and 3-D medical visualizations.
Apache License 2.0
324 stars 105 forks source link

Unable to install or test #126

Closed neurolabusc closed 1 year ago

neurolabusc commented 1 year ago

Describe the bug

Regardless of whether I use Windows or macOS, the demo web page appears blank. The Chrome Browser developer tools console window reports:

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
main.23fe6e18.chunk.js:1          Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR
DevTools failed to load source map: Could not load content for chrome-extension://gighmmpiobklfepjocnamgkkbiglidom/browser-polyfill.js.map: System error: net::ERR_FILE_NOT_FOUND

Regardless of whether I use Windows or macOS, the command npm install listed in the README.md generates a long string of errors, and the subsequent npm run start fails. An example output on macOS:

npm install
npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated babel-eslint@10.1.0: babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.
npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address'
npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel.
npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained
npm WARN deprecated node-pre-gyp@0.14.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
npm WARN deprecated @hapi/joi@15.1.1: Switch to 'npm install joi'
npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.
npm notice 
npm notice New major version of npm available! 8.19.3 -> 9.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.2.0
npm notice Run npm install -g npm@9.2.0 to update!
npm notice 
npm ERR! code 1
npm ERR! path /Users/cr/src/mriviewer/node_modules/canvas
npm ERR! command failed
npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
npm ERR! SOLINK_MODULE(target) Release/canvas-postbuild.node
npm ERR!   CXX(target) Release/obj.target/canvas/src/backend/Backend.o
npm ERR! Failed to execute '/opt/homebrew/Cellar/node/19.2.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/cr/src/mriviewer/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/cr/src/mriviewer/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@0.11.0
npm ERR! node-pre-gyp info using node@19.2.0 | darwin | arm64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download 
npm ERR! node-pre-gyp info check checked for "/Users/cr/src/mriviewer/node_modules/canvas/build/Release/canvas.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v111-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v111-darwin-unknown-arm64.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v111-darwin-unknown-arm64.tar.gz 
npm ERR! node-pre-gyp WARN Pre-built binaries not found for canvas@2.6.1 and node@19.2.0 (node-v111 ABI, unknown) (falling back to source compile with node-gyp) 
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/node-gfx/node-canvas-prebuilt/releases/download/v2.6.1/canvas-v2.6.1-node-v111-darwin-unknown-arm64.tar.gz 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@19.2.0 | darwin | arm64
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@19.2.0 | darwin | arm64
npm ERR! gyp info find Python using Python version 3.9.12 found at "/Users/cr/opt/anaconda3/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v19.2.0/node-v19.2.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.2.0/node-v19.2.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v19.2.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v19.2.0/SHASUMS256.txt
npm ERR! gyp info spawn /Users/cr/opt/anaconda3/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args   'binding.gyp',
npm ERR! gyp info spawn args   '-f',
npm ERR! gyp info spawn args   'make',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/cr/src/mriviewer/node_modules/canvas/build/config.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args   '-I',
npm ERR! gyp info spawn args   '/Users/cr/Library/Caches/node-gyp/19.2.0/include/node/common.gypi',
npm ERR! gyp info spawn args   '-Dlibrary=shared_library',
npm ERR! gyp info spawn args   '-Dvisibility=default',
npm ERR! gyp info spawn args   '-Dnode_root_dir=/Users/cr/Library/Caches/node-gyp/19.2.0',
npm ERR! gyp info spawn args   '-Dnode_gyp_dir=/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args   '-Dnode_lib_file=/Users/cr/Library/Caches/node-gyp/19.2.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args   '-Dmodule_root_dir=/Users/cr/src/mriviewer/node_modules/canvas',
npm ERR! gyp info spawn args   '-Dnode_engine=v8',
npm ERR! gyp info spawn args   '--depth=.',
npm ERR! gyp info spawn args   '--no-parallel',
npm ERR! gyp info spawn args   '--generator-output',
npm ERR! gyp info spawn args   'build',
npm ERR! gyp info spawn args   '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok 
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.1.0
npm ERR! gyp info using node@19.2.0 | darwin | arm64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/backend/Backend.cc:1:
npm ERR! In file included from ../src/backend/Backend.h:6:
npm ERR! In file included from ../../nan/nan.h:176:
npm ERR! ../../nan/nan_callbacks.h:55:23: error: no member named 'AccessorSignature' in namespace 'v8'
npm ERR! typedef v8::Local<v8::AccessorSignature> Sig;
npm ERR!                   ~~~~^
npm ERR! In file included from ../src/backend/Backend.cc:1:
npm ERR! In file included from ../src/backend/Backend.h:6:
npm ERR! ../../nan/nan.h:2535:8: error: no matching member function for call to 'SetAccessor'
npm ERR!   tpl->SetAccessor(
npm ERR!   ~~~~~^~~~~~~~~~~
npm ERR! /Users/cr/Library/Caches/node-gyp/19.2.0/include/node/v8-template.h:814:8: note: candidate function not viable: no known conversion from 'imp::Sig' (aka 'int') to 'v8::SideEffectType' for 7th argument
npm ERR!   void SetAccessor(
npm ERR!        ^
npm ERR! /Users/cr/Library/Caches/node-gyp/19.2.0/include/node/v8-template.h:807:8: note: candidate function not viable: no known conversion from 'imp::NativeGetter' (aka 'void (*)(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value> &)') to 'v8::AccessorGetterCallback' (aka 'void (*)(Local<v8::String>, const PropertyCallbackInfo<v8::Value> &)') for 2nd argument
npm ERR!   void SetAccessor(
npm ERR!        ^
npm ERR! ../src/backend/Backend.cc:111:10: warning: address of stack memory associated with local variable 'msg' returned [-Wreturn-stack-address]
npm ERR!   return msg.c_str();
npm ERR!          ^~~
npm ERR! 1 warning and 2 errors generated.
npm ERR! make: *** [Release/obj.target/canvas/src/backend/Backend.o] Error 1
npm ERR! gyp ERR! build error 
npm ERR! gyp ERR! stack Error: `make` failed with exit code: 2
npm ERR! gyp ERR! stack     at ChildProcess.onExit (/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:201:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:293:12)
npm ERR! gyp ERR! System Darwin 20.6.0
npm ERR! gyp ERR! command "/opt/homebrew/Cellar/node/19.2.0/bin/node" "/opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Users/cr/src/mriviewer/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/Users/cr/src/mriviewer/node_modules/canvas/build/Release" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v111"
npm ERR! gyp ERR! cwd /Users/cr/src/mriviewer/node_modules/canvas
npm ERR! gyp ERR! node -v v19.2.0
npm ERR! gyp ERR! node-gyp -v v9.1.0
npm ERR! gyp ERR! not ok 
npm ERR! node-pre-gyp ERR! build error 
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/opt/homebrew/Cellar/node/19.2.0/bin/node /opt/homebrew/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/cr/src/mriviewer/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/Users/cr/src/mriviewer/node_modules/canvas/build/Release --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v111' (1)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/cr/src/mriviewer/node_modules/canvas/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1098:16)
npm ERR! node-pre-gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:304:5)
npm ERR! node-pre-gyp ERR! System Darwin 20.6.0
npm ERR! node-pre-gyp ERR! command "/opt/homebrew/Cellar/node/19.2.0/bin/node" "/Users/cr/src/mriviewer/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Users/cr/src/mriviewer/node_modules/canvas
npm ERR! node-pre-gyp ERR! node -v v19.2.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/cr/.npm/_logs/2022-12-13T12_47_03_347Z-debug-0.log

Given the warnings, there seems to be incompatibilities with modern versions of node (e.g. I tried v18.12 on Windows and v19.2 on macOS). Are there work arounds?

alterfo commented 1 year ago

Dear Mr. Rorden.

It is not a node issue, it is the cairo-based canvas issue. Cairo-based means that you should install cairo lib on your system. Here is the instruction from here on how to do it: image

Let me know if it helped or didn't

alterfo commented 1 year ago

My apologies, I was in wrong context, it is another project - but the solution is still similar. Please, install required dev-tools via https://github.com/nodejs/node-gyp#on-windows

neurolabusc commented 1 year ago

Hmm, on Windows the gtk-2 and gtk-dev-2 installers created a lot of files in C:\GTK\bin, but there are a lot of unresolved dependencies

npm ERR! Warning: Missing input files:
npm ERR! C:\GTK\bin\libintl-8.dll
npm ERR! C:\GTK\bin\libexpat-1.dll
npm ERR! C:\GTK\bin\libpng14-14.dll

Is it possible to get the demo web page running for browsers?

alterfo commented 1 year ago

Unfortunately, it seems that EPAM doesn't support old version of the software and demo link is leading to new version Product page: https://lifescience.opensource.epam.com/mri/ Demo link: epa.ms/mri.

@DanilRostov please, correct me if I wrong.

DanilRostov commented 1 year ago

@alterfo http://epa.ms/mri is only alias for pre-released version. We're gona push upcoming major release in the nearest time. Old version is available through the next link and will be supported for a while - https://mriviewer.opensource.epam.com/, but

@neurolabusc regarding the original issue - currently there are some instrastructure issues with our several opensource projects. We're working on that and it will be fixed very soon.

hanayik commented 1 year ago

Hi, Just wanted to comment that this URL: https://mriviewer.opensource.epam.com/ is also not working for me (replicating @neurolabusc 's original post).

DanilRostov commented 1 year ago

@neurolabusc Thanks for opening an issue.

We have released version 2.0 of MRI viewer. Could you try to reproduce please? If you face any problems please open new issue with details. Thank you

vesper8 commented 3 months ago

For me I just had to use node 16, using nvm, to get it to work. On 18 and 20 it does not work, including the new 2.0 release. I think it should be made clear in the readme that this requires node 16.