본문 바로가기

프로젝트 설정

node-gyp rebuild error (window)

반응형

ERROR

ubuntu 

https://24hours-beginner.tistory.com/21

 

Ubuntu 18.04 node-gyp rebuild error

https://askubuntu.com/questions/1057737/ubuntu-18-04-lts-server-npm-depends-node-gyp-0-10-9-but-it-is-not-going = 0.10.9) but it is not going to be installed" data-og-description="My environment is..

24hours-beginner.tistory.com

node-gyp rebuild error.. 맨날본다. node 쓰면 거의 보는듯 ㅜ

더보기

error C:\project\node_modules\node-expat: Command failed.
Exit code: 1
Command: node-gyp rebuild
Arguments:
Directory: C:\project\node_modules\node-expat
Output:
C:\project\node_modules\node-expat>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\n
ode-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.14.1 | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=auto',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\project\\node_modules\\node-expat\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\user\\.node-gyp\\10.14.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\user\\.node-gyp\\10.14.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\user\\.node-gyp\\10.14.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\project\\node_modules\\node-expat',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\project\\node_modules\\node-expat\\build',
gyp info spawn args   '-Goutput_dir=.' ]
Warning: Missing input files:
C:\project\node_modules\node-expat\build\deps\libexpat\..\..\..\deps\libexpat\version.c
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
Warning: unrecognized setting VCCLCompilerTool/MultiProcessorCompilation
gyp info spawn C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
�� �ַ���� ������Ʈ�� �� ���� �ϳ��� �����մϴ�. ���� ���带 ����Ϸ��� "/m" ����ġ�� �߰��Ͻʽÿ�.
MSBUILD : error MSB3428: Visual C++ ���� ��� "VCBuild.exe"��(��) �ε��� �� �����ϴ�. �� ������ �ذ��Ϸ��� 1) .NET Framework 2.0 SDK�� ��ġ�ϰų�, 2) Microsoft Visual Studio 2


005�� ��ġ�ϰų�, 3) �ش� ���� ��Ұ� �ٸ� ��ġ�� ��ġ�Ǿ� �ִ� ��쿡�� �� ��ġ�� �ý��� ��ο� �߰��Ͻʽÿ�.  [C:\project\node_modules\no


de-expat\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at ChildProcess.emit (events.js:182:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12)
gyp ERR! System Windows_NT 10.0.17134
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"
gyp ERR! cwd C:\project\node_modules\node-expat
gyp ERR! node -v v10.14.1
gyp ERR! node-gyp -v v3.8.0

 

해결방안

1. python 2.X 을 깔아본다

2020/01/13 - [프로젝트 설정] - python 2.7 install (window) 왕초보 주인용

 

python 2.7 install (window) 왕초보 주인용

node js 프로젝트를 시작하는 도중.. python 없다는 error가 떠서 깔면서 적어보았다. 가끔씩 까먹는다. 1. 파이썬 홈페이지 접속 https://www.python.org/ Welcome to Python.org The official home of the Pytho..

24hours-beginner.tistory.com

이미 등록된 python이 있다면 삭제 후 다시 깔던가

아니면 2.7 다운로드 후 버전을 선택할 수 있다. 이건 다른블로그를 참조하자!


2. cmd나 powershell 를 "관리자 모드" 연 후 아래 명령어 두줄을 실행 한다.

https://code.i-harness.com/ko-kr/q/e6ce22 
> npm install --global --production windows-build-tools && npm install --global node-gyp

// cmd나 powershell 를 "관리자 모드" 연 후 아래 명령어 두줄을 실행 한다.
npm install --global --production windows-build-tools
npm install --global node-gyp
 

variable - windows build tools python path

NPM, 즉 jQuery를 통해 몇 가지 종속성을 다운로드해야하는 Node.js 코드베이스에 들어가고 있습니다. npm install jquery 를 실행하려고 시도 할 때 계속이 오류가 발생합니다. Your environment has been set up for using Node.js 0.8.21 (x64) and NPM C:\Users\Matt Cashatt>npm install jquery npm http GET https://registry.n

code.i-harness.com

3. 잘 되는지 보자

잘된다.

반응형