Closed hasmal95 closed 5 months ago
You're looking at 2 problems, 1. Python deprecated distutils in 3.10 so you need to rollback to nine or earlier. and or you don't have Visual Studio along with the Desktop C++ workloads installed. both of those are dependencies for robotjs.
Hello, i run the code but i always i get this error and i don't know how to fix it (Noob xD)
i run it with powershell (Admin) and with cmd in a folder i wanted.... but still nothing....
C:\Windows\System32>npm install robotjs npm warn deprecated npmlog@4.1.2: This package is no longer supported. npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported. npm warn deprecated gauge@2.7.4: This package is no longer supported. npm warn cleanup Failed to remove some directories [ npm warn cleanup [ npm warn cleanup 'C:\Windows\System32\node_modules\prebuild-install', npm warn cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Windows\System32\node_modules\prebuild-install\node_modules'] { npm warn cleanup errno: -4048, npm warn cleanup code: 'EPERM', npm warn cleanup syscall: 'rmdir', npm warn cleanup path: 'C:\Windows\System32\node_modules\prebuild-install\node_modules' npm warn cleanup } npm warn cleanup ] npm warn cleanup ] npm error code 1 npm error path C:\Windows\System32\node_modules\robotjs npm error command failed npm error command C:\WINDOWS\system32\cmd.exe /d /s /c prebuild-install || node-gyp rebuild npm error MSBUILD : error MSB1009: Project file does not exist. npm error Switch: build\binding.sln 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@20.14.0 | win32 | x64 npm error gyp info find Python using Python version 3.12.4 found at "C:\Users\Matthaios\AppData\Local\Programs\Python\Python312\python.exe" npm error gyp info find VS using VS2022 (17.10.35004.147) found at: npm error gyp info find VS "C:\Program Files\Microsoft Visual Studio\2022\Community" npm error gyp info find VS run with --verbose for detailed information npm error gyp info spawn C:\Users\Matthaios\AppData\Local\Programs\Python\Python312\python.exe npm error gyp info spawn args [ npm error gyp info spawn args 'C:\Users\Matthaios\AppData\Roaming\npm\node_modules\npm\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:\Windows\System32\node_modules\robotjs\build\config.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\Users\Matthaios\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\addon.gypi', npm error gyp info spawn args '-I', npm error gyp info spawn args 'C:\Users\Matthaios\AppData\Local\node-gyp\Cache\20.14.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\Matthaios\AppData\Local\node-gyp\Cache\20.14.0', npm error gyp info spawn args '-Dnode_gyp_dir=C:\Users\Matthaios\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp', npm error gyp info spawn args '-Dnode_lib_file=C:\\Users\\Matthaios\\AppData\\Local\\node-gyp\\Cache\\20.14.0\\<(target_arch)\\node.lib', npm error gyp info spawn args '-Dmodule_root_dir=C:\Windows\System32\node_modules\robotjs', 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:\Windows\System32\node_modules\robotjs\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\Community\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:\Users\Matthaios\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:209:23)
npm error gyp ERR! stack at ChildProcess.emit (node:events:519: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.22631
npm error gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\Matthaios\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
npm error gyp ERR! cwd C:\Windows\System32\node_modules\robotjs
npm error gyp ERR! node -v v20.14.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\Matthaios\AppData\Local\npm-cache_logs\2024-06-14T16_42_32_722Z-debug-0.log
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe
failed with exit code: 1 npm error gyp ERR! stack at ChildProcess.