Closed leonopteryx130 closed 1 year ago
This is not a OHIF viewer issue. You'll need to fix your own development environment. From your log it seems that you have a coy of python installed at D:\anaconda. It's possible that there is a mismatched version of python than the one node-sass need.
I suggest you search online for suggested solution that may work for you.
https://stackoverflow.com/questions/45801457/node-js-python-not-found-exception-due-to-node-sass-and-node-gyp
The following solution worked for me, Im not sure its the best approach as its installing and using an older version of python -2.7 , as well as setting the default version to 2.7. current version is 3.9.x.
To install version 2.7:
npm install --global windows-build-tools -
To set it to current active version:
npm config set python c:\python27\python.exe
2 questions:
Thank you for the help!
yarn install v1.22.10 warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. [1/5] Validating package.json... [2/5] Resolving packages... warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.8.4" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.11.2" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.10.2" warning webpack-dev-server > sockjs > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.8.4" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.14.8" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.8.4" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.9.6" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@7.1.2" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.6.0" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@7.6.0" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.6.3" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.7.2" warning Resolution field "@babel/runtime@7.5.5" is incompatible with requested version "@babel/runtime@^7.8.7" [3/5] Fetching packages... info fsevents@1.2.9: The platform "win32" is incompatible with this module. info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.3.2: The platform "win32" is incompatible with this module. info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. info fsevents@2.1.1: The platform "win32" is incompatible with this module. info "fsevents@2.1.1" is an optional dependency and failed compatibility check. Excluding it from installation. [4/5] Linking dependencies... warning " > @percy/cypress@2.3.4" has unmet peer dependency "cypress@^3 || ^4 || ^5 || ^6". warning " > cypress-file-upload@3.5.3" has unmet peer dependency "cypress@^3.0.0". warning " > eslint-config-react-app@4.0.1" has unmet peer dependency "@typescript-eslint/eslint-plugin@1.x". warning " > eslint-config-react-app@4.0.1" has unmet peer dependency "@typescript-eslint/parser@1.x". warning " > eslint-config-react-app@4.0.1" has incorrect peer dependency "babel-eslint@10.x". warning " > @ohif/core@2.13.13" has unmet peer dependency "cornerstone-core@^2.2.8". warning " > @ohif/core@2.13.13" has unmet peer dependency "cornerstone-tools@^4.20.1". warning " > @ohif/core@2.13.13" has unmet peer dependency "cornerstone-wado-image-loader@^3.1.0". warning " > @ohif/core@2.13.13" has unmet peer dependency "dicom-parser@^1.8.3". warning " > @ohif/i18n@0.53.0" has unmet peer dependency "i18next@^17.0.3". warning " > @ohif/i18n@0.53.0" has unmet peer dependency "i18next-browser-languagedetector@^3.0.1". warning " > @ohif/i18n@0.53.0" has unmet peer dependency "react-i18next@^10.11.0". warning " > @ohif/ui@1.9.2" has incorrect peer dependency "@ohif/i18n@^0.2.3". warning " > @ohif/ui@1.9.2" has unmet peer dependency "i18next@^17.0.3". warning " > @ohif/ui@1.9.2" has unmet peer dependency "react-i18next@^10.11.0". warning " > @ohif/extension-cornerstone@2.10.9" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-cornerstone@2.10.9" has incorrect peer dependency "@ohif/ui@^0.50.0". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "cornerstone-core@^2.2.8". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "cornerstone-math@^0.1.8". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "cornerstone-tools@^4.20.1". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "cornerstone-wado-image-loader@^3.1.0". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "dicom-parser@^1.8.3". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "hammerjs@^2.0.8". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "react-redux@^6.0.0". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "react-resize-detector@^3.4.0". warning " > @ohif/extension-cornerstone@2.10.9" has unmet peer dependency "redux@^4.0.1". warning " > @ohif/extension-debugging@0.2.2" has unmet peer dependency "dicom-parser@^1.8.3". warning " > @ohif/extension-dicom-html@1.3.10" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-dicom-html@1.3.10" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-dicom-html@1.3.10" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-dicom-microscopy@0.52.0" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-dicom-pdf@1.0.6" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-dicom-pdf@1.0.6" has unmet peer dependency "dicom-parser@^1.8.3". warning " > @ohif/extension-dicom-pdf@1.0.6" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-dicom-rt@0.6.13" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "cornerstone-core@^2.2.8". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "cornerstone-tools@^4.20.1". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "gl-matrix@^3.3.0". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-dicom-rt@0.6.13" has unmet peer dependency "react-tooltip@4.2.10". warning " > @ohif/extension-dicom-segmentation@0.6.10" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-dicom-segmentation@0.6.10" has unmet peer dependency "cornerstone-core@^2.2.8". warning " > @ohif/extension-dicom-segmentation@0.6.10" has unmet peer dependency "cornerstone-tools@^4.20.1". warning " > @ohif/extension-dicom-segmentation@0.6.10" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-dicom-segmentation@0.6.10" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-dicom-tag-browser@0.2.11" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-lesion-tracker@0.2.1" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-lesion-tracker@0.2.1" has unmet peer dependency "prop-types@^15.6.2". warning " > @ohif/extension-vtk@1.11.14" has incorrect peer dependency "@ohif/core@^0.50.0". warning " > @ohif/extension-vtk@1.11.14" has incorrect peer dependency "@ohif/i18n@^0.50.0". warning " > @ohif/extension-vtk@1.11.14" has incorrect peer dependency "@ohif/ui@^0.50.0". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "cornerstone-core@^2.2.8". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "cornerstone-tools@^4.20.1". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "cornerstone-wado-image-loader@^3.1.0". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "dcmjs@0.18.8". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "dicom-parser@^1.8.3". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "i18next@^17.0.3". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "i18next-browser-languagedetector@^3.0.1". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "prop-types@^15.7.2". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "react-i18next@^10.11.0". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "react-redux@^7.1.0". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "react-resize-detector@^4.2.0". warning " > @ohif/extension-vtk@1.11.14" has unmet peer dependency "redux@^4.0.1". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/i18n > react-i18next@10.13.2" has incorrect peer dependency "i18next@>= 17.0.0". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/ui > react-dates@21.2.1" has incorrect peer dependency "react-with-direction@^1.3.1". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/ui > react-transition-group@2.0.0" has incorrect peer dependency "react@^15.0.0". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/ui > react-transition-group@2.0.0" has incorrect peer dependency "react-dom@^15.0.0". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/viewer > vtk.js@11.14.0" has unmet peer dependency "wslink@^0.1.8". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "cornerstone-core@2.3.x". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "cornerstone-math@0.1.x". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "cornerstone-tools@4.x.x". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "cornerstone-wado-image-loader@3.0.x". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "dicom-parser@^1.8.3". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-cornerstone > react-cornerstone-viewport@4.0.5" has unmet peer dependency "hammerjs@^2.0.8". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/extension-vtk > react-vtkjs-viewport@0.14.2" has unmet peer dependency "vtk.js@^11.14.0". warning "workspace-aggregator-1f1f9210-6195-49ab-88d7-0c902cf0eec4 > @ohif/ui > docz-plugin-css > docz-core > react-docgen-typescript-loader@3.7.1" has unmet peer dependency "typescript@*".
Please review the latest code in the master branch. I am confident that this issue has been resolved. If it persists, kindly reopen the issue with updated details.
Try viewer-dev.ohif.org instead of viewer.ohif.org
Our viewer.ohif.org
is deployed from release
branch while viewer-dev.ohif.org
is our master
branch
Read more about branch explanations here https://docs.ohif.org/development/getting-started#developing
Bug Report
Describe the Bug
when I use "yarn install" command report errors:
error E:\ohif\Viewers-master\node_modules\node-sass: Command failed. Exit code: 1 Command: node scripts/build.js Arguments: Directory: E:\ohif\Viewers-master\node_modules\node-sass Output: Building: E:\nodejs\node.exe E:\ohif\Viewers-master\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ gyp verb cli 'E:\nodejs\node.exe', gyp verb cli 'E:\ohif\Viewers-master\node_modules\node-gyp\bin\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' gyp verb cli ] gyp info using node-gyp@3.8.0 gyp info using node@14.15.4 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:308:12)
gyp ERR! stack at ChildProcess.emit (events.js:315:20)
gyp ERR! stack at maybeClose (internal/child_process.js:1048:16)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
gyp ERR! System Windows_NT 10.0.19042
gyp ERR! command "E:\nodejs\node.exe" "E:\ohif\Viewers-master\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd E:\ohif\Viewers-master\node_modules\node-sass
gyp ERR! node -v v14.15.4
which
failed Error: not found: python2 gyp verbwhich
failed at getNotFoundError (E:\ohif\Viewers-master\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (E:\ohif\Viewers-master\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (E:\ohif\Viewers-master\node_modules\which\which.js:80:29) gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\which\which.js:89:16 gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:183:21) gyp verbwhich
failed python2 Error: not found: python2 gyp verbwhich
failed at getNotFoundError (E:\ohif\Viewers-master\node_modules\which\which.js:13:12) gyp verbwhich
failed at F (E:\ohif\Viewers-master\node_modules\which\which.js:68:19) gyp verbwhich
failed at E (E:\ohif\Viewers-master\node_modules\which\which.js:80:29) gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\which\which.js:89:16 gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\isexe\index.js:42:5 gyp verbwhich
failed at E:\ohif\Viewers-master\node_modules\isexe\windows.js:36:5 gyp verbwhich
failed at FSReqCallback.oncomplete (fs.js:183:21) { gyp verbwhich
failed code: 'ENOENT' gyp verbwhich
failed } gyp verb check python checking for Python executable "python" in the PATH gyp verbwhich
succeeded python D:\anaconda\anaconda\python.EXE gyp ERR! configure error gyp ERR! stack Error: Command failed: D:\anaconda\anaconda\python.EXE -c import sys; print "%s.%s.%s" % sys.version_info[:3]; gyp ERR! stack File "