Hello everyone,
Sorry to open a new topic, it is the first time I use the forum as I have not been able to find the solution to my problem.
I want to use Midi on my Node-red, the node-red-contrib-midi palette works fine on the Mac but on Windows I can't get it installed.
the first errors told me to install Python and Visual Basic, that's done.
But it still won't install.
I seem to understand in the log that something called "distutils" is missing. What is it and how do I fix it in Windows? Is it a versioning problem? Does anyone have a solution that can share with me?
I really appreciate it!
Thank you very much for your help.
LOG:
2023-12-09T11:25:45.019Z Install : node-red-contrib-midi 1.1.2
2023-12-09T11:25:45.028Z npm.cmd install --no-audit --no-update-notifier --no-fund --save --save-prefix=~ --production --engine-strict node-red-contrib-midi@1.1.2
2023-12-09T11:25:47.294Z [err] npm
2023-12-09T11:25:47.294Z [err] WARN config production Use `--omit=dev` instead.
2023-12-09T11:25:54.623Z [err] npm
2023-12-09T11:25:54.623Z [err] ERR! code 1
2023-12-09T11:25:54.623Z [err] npm
2023-12-09T11:25:54.623Z [err] ERR!
2023-12-09T11:25:54.623Z [err] path
2023-12-09T11:25:54.623Z [err] C:\Users\escap\.node-red\node_modules\midi
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] command failed
2023-12-09T11:25:54.625Z [err] npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp rebuild
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info it worked if it ends with ok
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info using node-gyp@9.4.0
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info using node@20.9.0 | win32 | x64
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info find Python using Python version 3.12.0 found at "C:\Users\escap\AppData\Local\Programs\Python\Python312\python.exe"
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info find VS using VS2022 (17.8.34322.80) found at:
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info find VS run with --verbose for detailed information
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn C:\Users\escap\AppData\Local\Programs\Python\Python312\python.exe
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info spawn args [
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info spawn args 'binding.gyp',
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info spawn args '-f',
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info spawn args 'msvs',
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info spawn args '-I',
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info spawn args 'C:\\Users\\escap\\.node-red\\node_modules\\midi\\build\\config.gypi',
2023-12-09T11:25:54.625Z [err] npm ERR!
2023-12-09T11:25:54.625Z [err] gyp info spawn args '-I',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args '-I',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args 'C:\\Users\\escap\\AppData\\Local\\node-gyp\\Cache\\20.9.0\\include\\node\\common.gypi',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args '-Dlibrary=shared_library',
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info spawn args '-Dvisibility=default',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args '-Dnode_root_dir=C:\\Users\\escap\\AppData\\Local\\node-gyp\\Cache\\20.9.0',
2023-12-09T11:25:54.625Z [err] npm
2023-12-09T11:25:54.625Z [err] ERR! gyp info spawn args '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args '-Dnode_lib_file=C:\\\\Users\\\\escap\\\\AppData\\\\Local\\\\node-gyp\\\\Cache\\\\20.9.0\\\\<(target_arch)\\\\node.lib',
2023-12-09T11:25:54.625Z [err] npm ERR! gyp info spawn args '-Dmodule_root_dir=C:\\Users\\escap\\.node-red\\node_modules\\midi',
2023-12-09T11:25:54.626Z [err] npm ERR! gyp info spawn args '-Dnode_engine=v8',
2023-12-09T11:25:54.626Z [err] npm ERR! gyp info spawn args '--depth=.',
2023-12-09T11:25:54.626Z [err] npm ERR! gyp info spawn args '--no-parallel',
2023-12-09T11:25:54.626Z [err] npm ERR!
2023-12-09T11:25:54.626Z [err] gyp info spawn args '--generator-output',
2023-12-09T11:25:54.626Z [err] npm ERR! gyp info spawn args 'C:\\Users\\escap\\.node-red\\node_modules\\midi\\build',
2023-12-09T11:25:54.626Z [err] npm ERR!
2023-12-09T11:25:54.626Z [err] gyp info spawn args '-Goutput_dir=.'
2023-12-09T11:25:54.626Z [err] npm ERR! gyp info spawn args ]
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! Traceback (most recent call last):
2023-12-09T11:25:54.626Z [err] npm ERR! File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\gyp_main.py", line 42, in <module>
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! import gyp # noqa: E402
2023-12-09T11:25:54.626Z [err] npm ERR! ^^^^^^^^^^
2023-12-09T11:25:54.626Z [err] npm ERR! File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\__init__.py", line 9, in <module>
2023-12-09T11:25:54.626Z [err] npm ERR!
2023-12-09T11:25:54.626Z [err] import gyp.input
2023-12-09T11:25:54.626Z [err] npm ERR! File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\gyp\pylib\gyp\input.py", line 19, in <module>
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! from distutils.version import StrictVersion
2023-12-09T11:25:54.626Z [err] npm ERR! ModuleNotFoundError: No module named 'distutils'
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! configure error
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! stack Error: `gyp` failed with exit code: 1
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:325:16)
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:514:28)
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:294:12)
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! System Windows_NT 10.0.22621
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! cwd C:\Users\escap\.node-red\node_modules\midi
2023-12-09T11:25:54.626Z [err] npm ERR!
2023-12-09T11:25:54.626Z [err] gyp ERR! node -v v20.9.0
2023-12-09T11:25:54.626Z [err] npm ERR! gyp ERR! node-gyp -v v9.4.0
2023-12-09T11:25:54.626Z [err] npm
2023-12-09T11:25:54.626Z [err] ERR! gyp ERR! not ok
2023-12-09T11:25:54.628Z [err]
2023-12-09T11:25:54.628Z [err] npm ERR! A complete log of this run can be found in: C:\Users\escap\AppData\Local\npm-cache\_logs\2023-12-09T11_25_47_225Z-debug-0.log
2023-12-09T11:25:54.651Z rc=1