cornerstonejs / cornerstone

JavaScript library to display interactive medical images including but not limited to DICOM
https://docs.cornerstonejs.org/
MIT License
2.04k stars 598 forks source link

Error when following installation doc #535

Closed shanebenlolo closed 3 years ago

shanebenlolo commented 3 years ago

Hello,

I am trying to install cornerstone locally by following the installation guide found here https://github.com/cornerstonejs/cornerstone/blob/master/docs/installation.md using the "Dev Build" instructions. However, my build is failing when running the npm run build command.

Here is a copy of the log that is generated on failure:

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build'
1 verbose cli ]
2 info using npm@6.14.13
3 info using node@v14.17.0
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle cornerstone-core@2.2.8~prebuild: cornerstone-core@2.2.8
6 info lifecycle cornerstone-core@2.2.8~build: cornerstone-core@2.2.8
7 verbose lifecycle cornerstone-core@2.2.8~build: unsafe-perm in lifecycle true
8 verbose lifecycle cornerstone-core@2.2.8~build: PATH: C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\user\Documents\Cornerstone-Test\node_modules\cornerstone\node_modules\.bin;C:\Users\user\Documents\Cornerstone-Test\node_modules\.bin;C:\Python27\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\nodejs\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\ninja;C:\cmake\cmake-3.21.0-rc3-windows-x86_64\bin;C:\Program Files (x86)\IncrediBuild;C:\chromedriver_win32;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\NASM;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\user\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\user\AppData\Local\Programs\Python\Python39\;C:\Users\user\AppData\Local\Microsoft\WindowsApps;C:\Users\user\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\user\AppData\Roaming\npm;C:\Users\user\AppData\Local\robocorp\webdrivers\chrome\91.0.4472.19\chromedriver_win32;C:\Users\user\AppData\Local\GitHubDesktop\bin;C:\Program Files\OpenSSL\bin;C:\Program Files (x86)\GitHub CLI\
9 verbose lifecycle cornerstone-core@2.2.8~build: CWD: C:\Users\user\Documents\Cornerstone-Test\node_modules\cornerstone
10 silly lifecycle cornerstone-core@2.2.8~build: Args: [ '/d /s /c', 'npm run test && npm run version && npm run webpack' ]
11 silly lifecycle cornerstone-core@2.2.8~build: Returned: code: 2  signal: null
12 info lifecycle cornerstone-core@2.2.8~build: Failed to exec build script
13 verbose stack Error: cornerstone-core@2.2.8 build: `npm run test && npm run version && npm run webpack`
13 verbose stack Exit status 2
13 verbose stack     at EventEmitter.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16)
13 verbose stack     at EventEmitter.emit (events.js:376:20)
13 verbose stack     at ChildProcess.<anonymous> (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (events.js:376:20)
13 verbose stack     at maybeClose (internal/child_process.js:1055:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
14 verbose pkgid cornerstone-core@2.2.8
15 verbose cwd C:\Users\user\Documents\Cornerstone-Test\node_modules\cornerstone
16 verbose Windows_NT 10.0.19042
17 verbose argv "C:\\Program Files (x86)\\nodejs\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build"
18 verbose node v14.17.0
19 verbose npm  v6.14.13
20 error code ELIFECYCLE
21 error errno 2
22 error cornerstone-core@2.2.8 build: `npm run test && npm run version && npm run webpack`
22 error Exit status 2
23 error Failed at the cornerstone-core@2.2.8 build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
shanebenlolo commented 3 years ago

I was able to get a successful build using the following commands:

git clone https://github.com/cornerstonejs/cornerstone.git cd ./cornerstone npm install npm start