NPM Dependency Issue when Installing Aspose.Slides for Node.js

I have been trying to work with aspose slides via Java and every time I go to install, I receive two pages worth of errors. I have a working jdk (openjdk and I test this using java --version) I see issues with node-gyp when I run the install and I am pretty sure that the dependency of java should automatically install)

upload.PNG (46.4 KB)

Also, when I go to install the build tools, the process gives errors denoting that the tooling is depricated is no longer needed

@coumarbj,
Thank you for contacting support.

We are sorry that you had to encounter this problem. Please try using the following instructions to install Aspose.Slides for Node.js:
Installation|Aspose.Slides for Node.js via .NET Documentation

If the issue persists, please provide a step-by-step description of how to reproduce the issue and provide the following additional information:

  • OS version on which you are installing Aspose.Slides for Node.js
  • Installed software:
    • Java version
    • Python version
    • Node.js version

Unfortunately, your screenshot has a very low resolution, and I cannot see any information on it.

What I have attached is the result of trying to install via java. I have attempted using .net before but that yielded similar errors

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm i aspose.slides.via.java
npm error code 1
npm error path C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm error java.cpp
npm error   javaObject.cpp
npm error C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31): error C2668: 'Nan::ReturnValue<T>::Set': ambiguous call to overloaded function [C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\build\nodejavabridge_bindings.vcxproj]
npm error C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31): error C2668:         with [C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\build\nodejavabridge_bindings.vcxproj]
npm error C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31): error C2668:         [ [C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\build\nodejavabridge_bindings.vcxproj]
npm error C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31): error C2668:             T=v8::Value [C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\build\nodejavabridge_bindings.vcxproj]npm error C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31): error C2668:         ] [C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\build\nodejavabridge_bindings.vcxproj]
npm error       C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\nan\nan_callbacks_12_inl.h(61,15):
npm error       could be 'void Nan::ReturnValue<T>::Set(uint32_t)'
npm error           with
npm error           [
npm error               T=v8::Value
npm error           ]
npm error       C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\nan\nan_callbacks_12_inl.h(56,15):
npm error       or       'void Nan::ReturnValue<T>::Set(int32_t)'
npm error           with
npm error           [
npm error               T=v8::Value
npm error           ]
npm error       C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\nan\nan_callbacks_12_inl.h(51,15):
npm error       or       'void Nan::ReturnValue<T>::Set(double)'
npm error           with
npm error           [
npm error               T=v8::Value
npm error           ]
npm error       C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\nan\nan_callbacks_12_inl.h(46,15):
npm error       or       'void Nan::ReturnValue<T>::Set(bool)'
npm error           with
npm error           [
npm error               T=v8::Value
npm error           ]
npm error       C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java\src\javaObject.cpp(245,31):
npm error       while trying to match the argument list '(jint)'
npm error gyp info it worked if it ends with ok
npm error gyp info using node-gyp@10.1.0
npm error gyp info using node@22.2.0 | win32 | x64
npm error gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"
npm error gyp info find VS using VS2022 (17.11.35017.193) found at:
npm error gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
npm error gyp info find VS run with --verbose for detailed information
npm error gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\node-gyp\\gyp\\gyp_main.py',
npm error gyp info spawn args 'binding.gyp',
npm error gyp info spawn args '-f',
npm error gyp info spawn args 'msvs',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\java\\build\\config.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\node-gyp\\addon.gypi',
npm error gyp info spawn args '-I',
npm error gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
npm error gyp info spawn args '-Dlibrary=shared_library',
npm error gyp info spawn args '-Dvisibility=default',
npm error gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
npm error gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\node-gyp',
npm error gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
npm error gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\java',
npm error gyp info spawn args '-Dnode_engine=v8',
npm error gyp info spawn args '--depth=.',
npm error gyp info spawn args '--no-parallel',
npm error gyp info spawn args '--generator-output',
npm error gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\java\\build',
npm error gyp info spawn args '-Goutput_dir=.'
npm error gyp info spawn args ]
npm error gyp info spawn C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe
npm error gyp info spawn args [
npm error gyp info spawn args 'build\\binding.sln',
npm error gyp info spawn args '/clp:Verbosity=minimal',
npm error gyp info spawn args '/nologo',
npm error gyp info spawn args '/p:Configuration=Release;Platform=x64'
npm error gyp info spawn args ]
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm error gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\node-gyp\lib\build.js:209:23)
npm error gyp ERR! stack at ChildProcess.emit (node:events:520:28)
npm error gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm error gyp ERR! System Windows_NT 10.0.19045
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm error gyp ERR! cwd C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\java
npm error gyp ERR! node -v v22.2.0
npm error gyp ERR! node-gyp -v v10.1.0
npm error gyp ERR! not ok
npm error A complete log of this run can be found in: C:\Users\coumarbj\AppData\Local\npm-cache\_logs\2024-07-08T18_14_29_681Z-debug-0.log

Also, the link that you gave directs to via Java which is fine. My associates and I have spent a fair bit of time looking into the documentation trying to understand and we seem to be following the instructions. Hopefully, you can make sense of this error message

@coumarbj,
Thank you for the error log. Could you kindly also share the information listed above?

os:

Windows 10.0.19045

java:

openjdk version "1.8.0_412-412"
OpenJDK Runtime Environment (build 1.8.0_412-412-b08)
OpenJDK Server VM (build 25.412-b08, mixed mode)

python:

3.12.4

node.js:

v22.2.0

@coumarbj,
Thank you for the additional information. Please note that the node-gyp requires python 2.x, not python 3.x. I hope this will help you to resolve the issue.

@andrey.potapov Are you aware of how to set the Python version that node-gyp uses? I know that this is outside of the scope of Aspose but it is a dependency I suppose. All of the commands that I see that are supposed to do this do not work. Also, I saw that I needed at the very least an empty binding.gyp so I have one in the root directory of my npm project.

this is where my Python 2^ version is:

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> py --list-paths
 -V:3.12 *        C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
 -V:2.7-32        C:\Python27\python.exe

Commands that I have tried in no particular order and their errors:

(1)

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> set NODE_GYP_FORCE_PYTHON=C:\Python27\python.exe  
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | win32 | x64
gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.11.35017.193) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
    return gyp_main(args)
           ^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 647, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 157, in Load
    result = gyp.input.Load(
             ^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2985, in Load
    LoadTargetBuildFile(
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 400, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
                      ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 237, in LoadOneBuildFile
    build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "binding.gyp", line 0

SyntaxError: invalid syntax
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:297:18)
gyp ERR! stack at ChildProcess.emit (node:events:520:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation
gyp ERR! node -v v22.2.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok

(2)

npm install --python=python2.7 

> job-soms-dashboard-presentation@1.0.0 install
> node-gyp rebuild

node:internal/modules/cjs/loader:1189
  throw err;
  ^

Error: Cannot find module 'C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation\node_modules\node-gyp\bin\node-gyp.js'
    at Module._resolveFilename (node:internal/modules/cjs/loader:1186:15)
    at Module._load (node:internal/modules/cjs/loader:1012:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12)
    at node:internal/main/run_main_module:30:49 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

Node.js v22.2.0
npm error code 1
npm error path C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation
npm error command failed
npm error command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild

(3)

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> node-gyp configure --python C:\Python27\python.exe
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | win32 | x64
gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.11.35017.193) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
           ^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 647, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 157, in Load
    result = gyp.input.Load(
             ^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2985, in Load
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 400, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
                      ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 237, in LoadOneBuildFile
    build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "binding.gyp", line 0

gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:297:18)
gyp ERR! stack at ChildProcess.emit (node:events:520:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--python" "C:\\Python27\\python.exe"
gyp ERR! cwd C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation
gyp ERR! node -v v22.2.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm instal python2.7
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/python2.7 - Not found
npm error 404
npm error 404  'python2.7@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: C:\Users\coumarbj\AppData\Local\npm-cache\_logs\2024-07-09T18_06_14_111Z-debug-0.log

(4)

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm i -g npm@latest 

changed 13 packages in 8s

24 packages are looking for funding
  run `npm fund` for details
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm config set python C:\Python27\python.exe
npm error `python` is not a valid npm option
npm error A complete log of this run can be found in: C:\Users\coumarbj\AppData\Local\npm-cache\_logs\2024-07-09T17_42_10_795Z-debug-0.log

(5) it is not shown but I edit the config file that pops up to include the python version path

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm config edit
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm config fix
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | win32 | x64
gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.11.35017.193) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
           ^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 647, in gyp_main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 157, in Load
             ^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2985, in Load
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 400, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
                      ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 237, in LoadOneBuildFile
    build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "binding.gyp", line 0

SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:297:18)
gyp ERR! stack at ChildProcess.emit (node:events:520:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation
gyp ERR! node -v v22.2.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok

(6)

PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> set PYTHON=C:\Python27\python.exe
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | win32 | x64
gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.11.35017.193) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm config set python C:\Python27\python.exe
npm error `python` is not a valid npm option
npm error A complete log of this run can be found in: C:\Users\coumarbj\AppData\Local\npm-cache\_logs\2024-07-09T17_32_47_820Z-debug-0.log
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> npm config edit
PS C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation> node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@10.1.0
gyp info using node@22.2.0 | win32 | x64
gyp info find Python using Python version 3.12.4 found at "C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe"

gyp info find VS using VS2022 (17.11.35017.193) found at:
gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Preview"
gyp info find VS run with --verbose for detailed information
gyp info spawn C:\Users\coumarbj\AppData\Local\Programs\Python\Python312\python.exe
gyp info spawn args [
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'msvs',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build\\config.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args '-I',
gyp info spawn args 'C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0\\include\\node\\common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=C:\\Users\\coumarbj\\AppData\\Local\\node-gyp\\Cache\\22.2.0',
gyp info spawn args '-Dnode_gyp_dir=C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\coumarbj\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\22.2.0\\\\<(target_arch)\\\\node.lib',
gyp info spawn args '-Dmodule_root_dir=C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'C:\\Users\\coumarbj\\work\\pptxGen\\job-soms-dashboard-presentation\\build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
Traceback (most recent call last):
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\gyp_main.py", line 45, in <module>
    sys.exit(gyp.script_main())
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 688, in script_main
    return main(sys.argv[1:])
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 680, in main
    [generator, flat_list, targets, data] = Load(
                                            ^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 157, in Load
    result = gyp.input.Load(
             ^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 2985, in Load
    LoadTargetBuildFile(
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 400, in LoadTargetBuildFile
    build_file_data = LoadOneBuildFile(
                      ^^^^^^^^^^^^^^^^^
  File "C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 237, in LoadOneBuildFile
    build_file_data = eval(build_file_contents, {"__builtins__": {}}, None)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "binding.gyp", line 0

SyntaxError: invalid syntax
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\coumarbj\AppData\Roaming\npm\node_modules\node-gyp\lib\configure.js:297:18)
gyp ERR! stack at ChildProcess.emit (node:events:520:28)
gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
gyp ERR! System Windows_NT 10.0.19045
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\coumarbj\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure"
gyp ERR! cwd C:\Users\coumarbj\work\pptxGen\job-soms-dashboard-presentation
gyp ERR! node -v v22.2.0
gyp ERR! node-gyp -v v10.1.0
gyp ERR! not ok

@coumarbj,
Thank you for the additional information.

We have opened the following new ticket(s) in our internal issue tracking system and will continue investigating the case according to the terms mentioned in Free Support Policies.

Issue ID(s): SLIDESNODEJS-63

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

1 Like

@coumarbj,
Unfortunately, we cannot reproduce the errors you described. Indeed, the main problems when installing Aspose.Slides for Node.js arise when installing the node-gyp. It is quite difficult to say what is wrong with node-gyp installation because we do not develop it. But we found a similar exception in node-gyp on GitHub: Error: `gyp` failed with exit code: 1 · Issue #2714 · nodejs/node-gyp · GitHub. We suggest you try this solution.

1 Like