node-gyp 빌드 오류 창 x64
지금까지 x64 OS에서 수행 한 작업은 다음과 같습니다.
- Python (v2.7-특히 2.7.6)을 설치하고 시스템 경로 (C : \ Python27)에 추가했습니다.
- MS VS C ++ 2010 Express 버전 설치 (이미 VS 2012가 있지만 C ++ 구성 요소가 없음)
- Windows SDK 7.1 용 컴파일러 업데이트를 설치했습니다.
node-gyp 구성을 성공적으로 실행했습니다 (binding.gyp이있는 nodejs \ node_modules 아래의 애드온 디렉토리에서)
run node-gyp build (관리자 권한) ** 이것이 충돌하여 다음과 같은 문제가 발생했습니다.
이 오류 :
C:\Program Files\nodejs\node_modules\msnodesql>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.12.2
gyp info using node@0.10.25 | win32 | x64
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' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
LINK : 치명적인 오류 LNK1181 : 'kernel32.lib'입력 파일을 열 수 없습니다. [C : \ Program Files \ nodejs \ node_modules \ msnodesql \ build \ sqlserver.vcxproj]
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:\Users\RNelson\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\RNelson\\AppData\\Roaming\\npm\\node_modules\\node- gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd C:\Program Files\nodejs\node_modules\msnodesql
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
무슨 일이 일어나고 있는지에 대한 아이디어가 있습니까? 미리 감사드립니다! Node.js 용 node-sqlserver MS 드라이버를 사용하려고합니다.
npm config set msvs_version 2013 --global 내가 VS 노드 도구를 사용하면서 나를 위해 일했으며 npm 설치를 할 때마다 msvs_version을 지정할 필요가 없습니다.
npm의 구성 (c : \ Users \ username \ .npmrc)에 오래된 항목 인 msvs_version = 2012가있는 문제가 발생했습니다.
비슷한 문제가있었습니다. 이 스위치가 도움이되었음을 알았습니다.
--msvs_version=2012
그래서 예를 들어
npm install --msvs_version=2012 <package>
이 작업을 수행하는 데 잠시 시간을 보낸 후 (내가 받아 들인 대답이 작동하지 않았으며 절반의 해결책 일뿐입니다) 다음을 수행했습니다.
안타깝게도 Visual Studio가 있어야합니다 (데스크탑 용 Express Edition 2013을 설치했습니다).
Python 2.7.3 설치 (환경 변수를 설정할 필요가 없음)
관리자 권한으로 cmd를 실행하고 프로젝트 루트로 이동합니다 (package.json 파일은 어디에 있습니까).
첫 실행 :
npm config set python C:\Python27\python.exe그때:
npm install -msvs_version=2013
트릭은 npm config set python ...path_to_python_exe...npm이 파이썬이 필요한 종속성에 제공되는 명령 에 있습니다. 파이썬을 env 변수로 설정하는 것만으로는 충분하지 않은 이유를 모르겠습니다.
위의 모든 것이 작동하지 않는 경우 (내 경우 -Windows10 64bit )
삭제 C : \ 사용자 \ 사용자 _ 이름 \ .node - 사기꾼
% AppData % / npm 삭제
% AppData % / npm-cache 삭제
그리고 node-gyp을 다시 설치 하십시오.
node-gyp 페이지의 지침에 따라
옵션 1 npm install --global --production windows-build-tools를 선택했습니다.
Windows 또는 기타 OS에 node-gyp 설치용
먼저 node-gyp을 다운로드해야 할 수 있습니다.
$ npm install -g node-gyp-install
그런 다음 설치
$ npm install -g node-gyp
루트 / 관리자로 위의 절차를 수행해야 할 수도 있습니다.
I had this same error now in 2015 when trying to install Keystone and I ran through all you told me but it didn't work on it's own. At the end, I just had to run the command
"C:\Program Files\Microsoft SDKs\Windows\v7.1\bin\SetEnv.CMD" /Release /x64
to set up the environment before running the command. (Don't freak out when it turns your window text green, it's working). So yeah I'd do the installations and set up environment variables in the same way everywhere on the internet suggests but make sure to run the above command before running any other command. It probably won't be useful to you, but hopefully it's useful to someone else. If that still doesn't work, MSVS version 2010 worked for me, so install that version and use the flag -msvs_version=2010 when running the npm command.
For me the solution that worked with VS express was to simply install Visual Studio 2013 Express for desktop (which is the only one that gives you a developer command prompt as of 2013 version). Open developer command prompt (elevated) and run NPM install commands. This did not require any special --msvs_version arguments, it just worked.
I came across this problem myself, and this is how I solved it using Visual Studio 2010:
Install following packages
- Python 2.7+
- Visual C++ Studio 2010 Express
- Windows SDK 7.1 Note: If you get error on installation, maybe this link will help you.
- Visual Studio 2010 SP1
- Visual C++ 2010 SP1 Compiler Update for the Windows SDK 7.1
Use npm install from the Windows SDK command prompt (you need this because it sets additional environment variables).
Source: node-gyp instructions for VS2010
For me (Windows 7 64bit),
I struggled with this issue for half of a day Finally It worked.
On my way :
At control panel, I deleted all Python, Microsoft Visual Studio, Microsoft Redistributable, and something about I installed to solve this.
Window Update and restart.
Installed Python27, and Visual Studio 2013 with no setting env-val
npm install node-gyp -g- I got an error same thing, but after
npm config set msvs_version 2013 --global, It works.
there is an easy to use windows build tools global node package. You could try this.
참고URL : https://stackoverflow.com/questions/21562038/node-gyp-build-error-windows-x64
'Program Club' 카테고리의 다른 글
| C 문자열에서 '\ 0'뒤의 메모리는 어떻게됩니까? (0) | 2020.11.20 |
|---|---|
| SQL 대 noSQL (속도) (0) | 2020.11.20 |
| SpringData JPA는 네이티브 쿼리 결과를 Non-Entity POJO에 매핑합니다. (0) | 2020.11.20 |
| Ruby의 자연어 처리 (0) | 2020.11.20 |
| 자바 스크립트가 헤드 태그에 있어야합니까? (0) | 2020.11.20 |