Errors of ITK.js Hello World project

Hi,

I’m interested in ITK.js and trying a Hello World project.(https://insightsoftwareconsortium.github.io/itk-js/examples/hello_world_node.html)

I installed tools as instructions.
Then I executed “npx itk-js build .”, I got error messages.
Would you give me any advice to solve these errors?
Error messages are below.

Not searching for unused variables given on the command line.
CMake Error at /usr/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:168 (file):
  file failed to open for writing (No such file or directory):

    /work/web-build/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error at /usr/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:170 (file):
  file failed to open for writing (No such file or directory):

    /work/web-build/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: Could not open file for write in copy operation /work/web-build/CMakeFiles/3.17.1/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.17/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: Could not open file for write in copy operation /work/web-build/CMakeFiles/3.17.1/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.17/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: Could not find cmake module file: /work/web-build/CMakeFiles/3.17.1/CMakeCCompiler.cmake
CMake Error: Could not open file for write in copy operation /work/web-build/CMakeFiles/3.17.1/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.17/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:2 (project)


CMake Error: Could not find cmake module file: /work/web-build/CMakeFiles/3.17.1/CMakeCXXCompiler.cmake
CMake Error: Could not open file for write in copy operation /work/web-build/itkJSPipelinePrehello.js.tmp
CMake Error: : System Error: Permission denied
CMake Error at /usr/share/cmake-3.17/Modules/ITKBridgeJavaScript.cmake:17 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:4 (add_executable)


-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /work/web-build/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /work/web-build/CMakeCache.txt
CMake Error: : System Error: Permission denied

I dumb question first: do you have write permission for /work/web-build/, and does that drive have enough free space?

Hi, dzenanz
Thank you for your reply.

I prepared a new 500 GiB HDD and install Ubuntu newly for this trial, so I think there is enough space.

I think “/work” means at root folder but both “/work” and “/work/web-build/” doesn’t exist at root folder of my local Unbutu system.
As a test, I created this folder in my local Ubuntu system and set R/W permissions.
Then I tried “npx itk-js build .” again, but I got same error messages.

Here is my question.
“/work/web-build” is need to create in local Ubuntu sytem?

Hi, dzenanz

I could solve this issue.

I didn’t understand that “/work/web-build” was mounted on the current working folder “web-build”.

Permittions were like below.
drwxrwxr-x 2 matsuzaki matsuzaki 4096 Jan 22 10:17 web-build
I thtought this was OK because Owner had R/W permission.

I added R/W permissions to Others like below.
drwxrwxrwx 2 matsuzaki matsuzaki 4096 Jan 22 10:17 web-build

Then “npx itk-js build .” completed and there were hello.js in “web-build” folder.

Thank you for your help.

2 Likes