解決したいこと
Node-RED上で、「メニュー > パレットの管理 > ノードの追加」から「node-red-contrib-teachable-machine」ノードを追加しようとしましたが、次のエラーが表示されます。
「追加処理が失敗しました: node-red-contrib-teachable-machine Install failed。詳細はログを確認してください。」
また、ユーザーディレクトリで「npm install node-red-contrib-teachable-machine」を実行してみても、下記に書いてある通りエラーメッセージが表示されます。
お手数ですが、この問題の解決策についてご教授いただけますと幸いです。
追記:他の画像認識系のノード(node-red-contrib-tensorflow)でもエラーが起きます。
発生している問題・エラーコード
C:\Users\Owner\.node-red>npm install node-red-contrib-teachable-machine
npm WARN deprecated npmlog@5.0.1: This package is no longer supported.
npm WARN deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported
npm WARN deprecated are-we-there-yet@2.0.0: This package is no longer supported.
npm WARN deprecated gauge@3.0.2: This package is no longer supported.
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@tensorflow\\tfjs-backend-webgl',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-backend-webgl\dist'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@tensorflow\\tfjs-backend-webgl\\dist'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-backend-webgl\dist'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@tensorflow\\tfjs-backend-webgl\\dist'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@mapbox\node-pre-gyp\node_modules\https-proxy-agent'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@mapbox\\node-pre-gyp\\node_modules\\https-proxy-agent'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@mapbox',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@mapbox\node-pre-gyp\lib'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@mapbox\\node-pre-gyp\\lib'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@mapbox'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@mapbox'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node scripts/install.js
npm ERR! CPU-windows-4.10.0.zip
npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.9.1.zip
npm ERR! node-pre-gyp install failed with error: Error: Command failed: node-pre-gyp install --fallback-to-build
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp@1.0.9
npm ERR! node-pre-gyp info using node@20.13.1 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node" (not found)
npm ERR! node-pre-gyp http GET https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.10.0/CPU-windows-4.10.0.zip
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.10.0/CPU-windows-4.10.0.zip
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/tfjs-node@4.10.0 and node@20.13.1 (node-v115 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://storage.googleapis.com/tf-builds/pre-built-binary/napi-v8/4.10.0/CPU-windows-4.10.0.zip
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.1.0
npm ERR! gyp info using node@20.13.1 | win32 | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@10.1.0
npm ERR! gyp info using node@20.13.1 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.1 found at "C:\Users\Owner\AppData\Local\Programs\Python\Python311\python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version not set from command line or npm config
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS Failure details: undefined
npm ERR! gyp ERR! find VS checking VS2022 (17.2.32630.192) found at:
npm ERR! gyp ERR! find VS "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - missing any VC++ toolset
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS could not use PowerShell to find Visual Studio 2017 or newer, try re-running with '--loglevel silly' for more details.
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS Failure details: undefined
npm ERR! gyp ERR! find VS unsupported version "17.2.32630.192" found at "C:\Program Files\Microsoft Visual Studio\2022\Community"
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS not looking for VS2015 as it is only supported up to Node.js 18
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack at VisualStudioFinder.fail (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:116:11)
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:72:17)
npm ERR! gyp ERR! stack at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
npm ERR! gyp ERR! stack at async createBuildDir (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:95:26)
npm ERR! gyp ERR! stack at async run (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js:81:18)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm 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" "configure" "--fallback-to-build" "--module=C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8" "--napi_version=9" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8"
npm ERR! gyp ERR! cwd C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node
npm ERR! gyp ERR! node -v v20.13.1
npm ERR! gyp ERR! node-gyp -v v10.1.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node\lib\napi-v8 --napi_version=9 --node_abi_napi=napi --napi_build_version=8 --node_napi_label=napi-v8' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:519:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1105:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:305:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19045
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Owner\\.node-red\\node_modules\\node-red-contrib-teachable-machine\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\Owner\.node-red\node_modules\node-red-contrib-teachable-machine\node_modules\@tensorflow\tfjs-node
npm ERR! node-pre-gyp ERR! node -v v20.13.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.9
npm ERR! node-pre-gyp ERR! not ok
npm ERR! * Downloading libtensorflow
npm ERR!
npm ERR! * Building TensorFlow Node.js bindings
npm ERR! A complete log of this run can be found in: C:\Users\Owner\AppData\Local\npm-cache\_logs\2024-07-22T17_41_35_706Z-debug-0.log
自分で試したこと
ネットの記事で見た「npm config set strict-ssl false」と時刻の設定を更新するのは試しましたが、解決しなかったです。