작성
·
938
0
tfjs-node 안깔려서 해보라고 하는거 해보다가
잘 되던 nodemon server.js 도 안되고 뭐가 잘못됐는지 모르겠습니다.
빨리 마무리하고 싶은데 답답하네요
강의 업데이트 좀 해주셨으면 좋겠는데 생각 없으신가요
답변 1
0
처음에 tfjs-node가 설치가 안됐을 때 어떤 이슈가 있으셨나요? 에러 내용을 알려주시면 확인해보겠습니다~그리고 npm update에서 꼬인 부분은 루트에서 package-lock.json을 지우고, 다시 시도해보시면 확인할 수 있을 것 같아요!
확인이 늦어 죄송합니다. 에러를 봤을 때 node-gyp이 제대로 설치되지 않으신 것 같은데 아래 링크들을 참고해보시겠어요? 저는 "node-gyp windows 10" 라는 키워드로 검색했습니다.
https://velog.io/@wjs4199/React-npm-install%EC%8B%9C-node-gyp-%EC%97%90%EB%9F%AC
C:\Users\White\Desktop\grab-market-server>npm i "@tensorflow/tfjs-node"
npm WARN cleanup Failed to remove some directories [
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-backend-webgl',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-backend-webgl\dist\kernels'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-backend-webgl\\dist\\kernels'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-backend-webgl'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-backend-webgl'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node\deps\include\tensorflow\c'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node\\deps\\include\\tensorflow\\c'
npm WARN cleanup }
npm WARN cleanup ],
npm WARN cleanup [
npm WARN cleanup 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node',
npm WARN cleanup [Error: EPERM: operation not permitted, rmdir 'C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node\deps\include\tensorflow\c'] {
npm WARN cleanup errno: -4048,
npm WARN cleanup code: 'EPERM',
npm WARN cleanup syscall: 'rmdir',
npm WARN cleanup path: 'C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node\\deps\\include\\tensorflow\\c'
npm WARN cleanup }
npm WARN cleanup ]
npm WARN cleanup ]
npm ERR! code 1
npm ERR! path C:\Users\White\Desktop\grab-market-server\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.2.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@18.14.0 | win32 | x64
npm ERR! node-pre-gyp info check checked for "C:\Users\White\Desktop\grab-market-server\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.2.0/CPU-windows-4.2.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.2.0/CPU-windows-4.2.0.zip
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/tfjs-node@4.2.0 and node@18.14.0 (node-v108 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.2.0/CPU-windows-4.2.0.zip
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@9.3.0
npm ERR! gyp info using node@18.14.0 | 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@9.3.0
npm ERR! gyp info using node@18.14.0 | win32 | x64
npm ERR! gyp info find Python using Python version 3.11.2 found at "C:\Users\White\AppData\Local\Programs\Python\Python311\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/node-v18.14.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v18.14.0/win-arm64/node.lib
npm ERR! gyp http 404 https://nodejs.org/download/release/v18.14.0/win-arm64/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/win-x86/node.lib
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.14.0/win-x64/node.lib
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 looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
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:122:47)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:75:16
npm ERR! gyp ERR! stack at VisualStudioFinder.findVisualStudio2013 (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:369:14)
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:71:14
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:390:16
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7
npm ERR! gyp ERR! stack at C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16
npm ERR! gyp ERR! stack at ChildProcess.exithandler (node:child_process:427:5)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! gyp ERR! System Windows_NT 10.0.22621
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\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=8" "--node_napi_label=napi-v8"
npm ERR! gyp ERR! cwd C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node
npm ERR! gyp ERR! node -v v18.14.0
npm ERR! gyp ERR! node-gyp -v v9.3.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\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node --module_name=tfjs_binding --module_path=C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node\lib\napi-v8 --napi_version=8 --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\White\Desktop\grab-market-server\node_modules\@mapbox\node-pre-gyp\lib\util\compile.js:89:23)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1091:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.22621
npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\White\\Desktop\\grab-market-server\\node_modules\\@mapbox\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd C:\Users\White\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node
npm ERR! node-pre-gyp ERR! node -v v18.14.0
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:
npm ERR! C:\Users\White\AppData\Local\npm-cache\_logs\2023-03-06T11_46_45_981Z-debug-0.log
이런 에러가 뜹니다.
그리고 우선 npm update는 해결 되었습니다.
감사합니다.