인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

인프런 커뮤니티 질문&답변

na3071576님의 프로필 이미지
na3071576

작성한 질문수

비전공자를 위한 진짜 입문 올인원 개발 부트캠프

상품 분류 로직 구현하기

npm install @tensorflow/tfjs-node 설치 중 에러 발생 질문입니다.

작성

·

1.5K

0

강의 3분 20초경 터미널에 입력하는

npm install "@tensorflow/tfjs-node"

명령어 입력시 에러 발생됩니다.

커뮤니티에 있는 방법으로 처음부터 다시 진행하였지만 지속적인 에러발생으로 도움 요청드립니다.

에러내용 첨부합니다.

C:\Users\HUMANTECSOFT-04\Desktop\grab-market-server>npm install "@tensorflow/tfjs-node"

npm WARN old lockfile

npm WARN old lockfile The package-lock.json file was created with an old version of npm,

npm WARN old lockfile so supplemental metadata must be fetched from the registry.

npm WARN old lockfile 

npm WARN old lockfile This is a one-time fix-up, please be patient...

npm WARN old lockfile 

npm ERR! code 1

npm ERR! path C:\Users\HUMANTECSOFT-04\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-3.8.0.zip

npm ERR! https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-windows-x86_64-2.5.0.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.4

npm ERR! node-pre-gyp info using node@14.17.4 | win32 | x64

npm ERR! node-pre-gyp info check checked for "C:\Users\HUMANTECSOFT-04\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/3.8.0/CPU-windows-3.8.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/3.8.0/CPU-windows-3.8.0.zip 

npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @tensorflow/tfjs-node@3.8.0 and node@14.17.4 (node-v83 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/3.8.0/CPU-windows-3.8.0.zip 

npm ERR! gyp info it worked if it ends with ok

npm ERR! gyp info using node-gyp@7.1.2

npm ERR! gyp info using node@14.17.4 | 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@7.1.2

npm ERR! gyp info using node@14.17.4 | win32 | x64

npm ERR! gyp info find Python using Python version 2.7.9 found at "C:\Python27\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 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:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:121:47)

npm ERR! gyp ERR! stack     at C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:74:16

npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:351:14)

npm ERR! gyp ERR! stack     at C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:70:14

npm ERR! gyp ERR! stack     at C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\find-visualstudio.js:372:16

npm ERR! gyp ERR! stack     at C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:54:7

npm ERR! gyp ERR! stack     at C:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\util.js:33:16

npm ERR! gyp ERR! stack     at ChildProcess.exithandler (child_process.js:397:5)

npm ERR! gyp ERR! stack     at ChildProcess.emit (events.js:400:28)

npm ERR! gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)

npm ERR! gyp ERR! System Windows_NT 10.0.19042

npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HUMANTECSOFT-04\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "configure" "--fallback-to-build" "--module=C:\\Users\\HUMANTECSOFT-04\\Desktop\\grab-market-server\\node_modules\\@tensorflow\\tfjs-node\\lib\\napi-v8\\tfjs_binding.node" "--module_name=tfjs_binding" "--module_path=C:\\Users\\HUMANTECSOFT-04\\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\HUMANTECSOFT-04\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node        

npm ERR! gyp ERR! node -v v14.17.4

npm ERR! gyp ERR! node-gyp -v v7.1.2

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:\Users\HUMANTECSOFT-04\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js configure --fallback-to-build --module=C:\Users\HUMANTECSOFT-04\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node\lib\napi-v8\tfjs_binding.node 

--module_name=tfjs_binding --module_path=C:\Users\HUMANTECSOFT-04\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\HUMANTECSOFT-04\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 (events.js:400:28)

npm ERR! node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1055:16)

npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)       

npm ERR! node-pre-gyp ERR! System Windows_NT 10.0.19042

npm ERR! node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\HUMANTECSOFT-04\\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\HUMANTECSOFT-04\Desktop\grab-market-server\node_modules\@tensorflow\tfjs-node

npm ERR! node-pre-gyp ERR! node -v v14.17.4

npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.4

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\HUMANTECSOFT-04\AppData\Local\npm-cache\_logs\2021-08-13T02_43_45_266Z-debug.log

------------------------------------------------------------------------------------------------------------------

개선 방법으로 

1. 파이선 버전 2.7.9로 다운

2. npm install --global windows-build-tools

(이부분도 설치시간이 상당히 오래걸리며 뻗는거 같습니다.)

3. npm i -g node-gyp (설치됨 확인했습니다.)

가능하면 원격지원 요청드립니다.

답변 1

0

그랩님의 프로필 이미지
그랩
지식공유자

안녕하세요!

모든 명령어는 관리자 권한으로 vscode가 아닌 파워셀(혹은 cmd) 들어가서 실행해보시면 좋을 것 같습니다.

우선 아래 공식 가이드를 따라해보시는 걸 추천드리겠습니다!

https://github.com/tensorflow/tfjs/blob/master/tfjs-node/WINDOWS_TROUBLESHOOTING.md

na3071576님의 프로필 이미지
na3071576

작성한 질문수

질문하기