Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build error #26

Closed
ganluo960214 opened this issue Aug 31, 2016 · 3 comments
Closed

build error #26

ganluo960214 opened this issue Aug 31, 2016 · 3 comments

Comments

@ganluo960214
Copy link

C:\Users\Administrator>npm install win32ole
npm WARN engine win32ole@0.1.3: wanted: {"node":">= 0.8.18 && < 0.9.0"} (current
: {"node":"4.5.0","npm":"2.15.9"})

ref@1.3.2 install C:\Users\Administrator\node_modules\win32ole\node_modules\re
f
node-gyp rebuild

C:\Users\Administrator\node_modules\win32ole\node_modules\ref>if not defined npm
_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bi
n....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild
)
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C4430: missing type specifier - int ass
umed. Note: C++ does not support default-int
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C2440: 'initializing' : cannot convert
from 'PfnDliHook' to 'int'
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C2146: syntax error : missing ';' befor
e identifier '__pfnDliNotifyHook2'
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C4430: missing type specifier - int ass
umed. Note: C++ does not support default-int
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C2373: '__pfnDliNotifyHook2' : redefini
tion; different type modifiers
..............\Program Files\nodejs\node_modules\npm\node_modules\node-gy
p\src\win_delay_load_hook.cc(34): error C2440: 'initializing' : cannot convert
from 'FARPROC (__stdcall *)(unsigned int,DelayLoadInfo *)' to 'int'
c:\users\administrator.node-gyp\4.5.0\include\node\v8.h(19): fatal error C1083
: Cannot open include file: 'stdint.h': No such file or directory
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v3.5\msbuild.exe fail
ed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules
npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_proces
s.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodej
s\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Administrator\node_modules\win32ole\node_modules\ref
gyp ERR! node -v v4.5.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "install" "win32ole"
npm ERR! node v4.5.0
npm ERR! npm v2.15.9
npm ERR! code ELIFECYCLE

npm ERR! ref@1.3.2 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.3.2 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the ref package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs ref
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls ref
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Administrator\npm-debug.log

@gucong3000
Copy link

+1

@generalov
Copy link

I've solved it with recipes from nodejs/node-gyp#972:

You must have at least 3.10.8 version of NPM. This is critical.

npm -g install npm@latest

Make sure Node globally uses the same MS Visual Studio version

npm config set msvs_version 2015 --global

Reinstall node-gyp

npm remove -g node-gyp
npm install -g node-gyp

Delete node_modules directory in your project

rimraf node_modules

@ganluo960214
Copy link
Author

@generalov thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants