2017-03-05 138 views
1

我想在下面的環境中使用orientjs。npm install orientjs致命錯誤。 node_version.h在哪裏?

  • 窗口10 Pro的64位
  • 節點v6.9.2
  • 節點GYP v3.4.0
  • orientjs 2.2.4

1)安裝 「Windows的構建工具」

$ npm install --global --production windows-build-tools 

...好的...

2)安裝「orientjs」

但是,我遇到了致命的錯誤。 node_version.h在哪裏? 幫助我。

$ npm install orientjs --save 
npm WARN deprecated [email protected]: use uuid module instead 

> [email protected] install C:\test1\node_modules\orientjs-native 
> node-gyp rebuild 


[email protected] C:\test1\node_modules\orientjs-native 
$ if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild) else (node "" rebuild) 
    deserializer.cc 
    orientc_reader.cpp 
    orientc_writer.cpp 
    listener.cc 

C:\test1\node_modules\nan\nan.h(23): fatal error C1083: Cannot open include file: 'node_version.h': No such file or d irectory (compiling source file ..\lib\native\listener.cc) [C:\test1\node_modules\orientjs-native\build\deserializer. vcxproj] 

C:\test1\node_modules\nan\nan.h(23): fatal error C1083: Cannot open include file: 'node_version.h': No such file or d irectory (compiling source file ..\lib\native\deserializer.cc) [C:\test1\node_modules\orientjs-native\build\deseriali zer.vcxproj] 

    writer.cc 
    helpers.cpp 
C:\test1\node_modules\nan\nan.h(23): fatal error C1083: Cannot open include file: 'node_version.h': No such file or d irectory (compiling source file ..\lib\native\writer.cc) [C:\test1\node_modules\orientjs-native\build\deserializer.vc xproj] 
    parse_exception.cpp 
    win_delay_load_hook.cc 
..\lib\native\orientc_reader.cpp(38): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(47): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(81): warning C4244: 'argument': conversion from 'int64_t' to 'long', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(91): warning C4244: 'argument': conversion from 'int64_t' to 'short', possible loss 
of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(146): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(147): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(189): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(198): warning C4244: '=': conversion from 'int64_t' to 'long', possible loss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(207): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible lo ss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(217): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible lo ss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(237): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(242): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible lo ss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(266): warning C4244: 'argument': conversion from 'int64_t' to 'int', possible loss o f data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_reader.cpp(270): warning C4244: 'initializing': conversion from 'int64_t' to 'int', possible lo ss of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_writer.cpp(267): warning C4244: 'argument': conversion from 'long' to 'int16_t', possible loss 
of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
..\lib\native\orientc_writer.cpp(348): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible los s of data [C:\test1\node_modules\orientjs-native\build\deserializer.vcxproj] 
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\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:276:23) 
gyp ERR! stack  at emitTwo (events.js:106:13) 
gyp ERR! stack  at ChildProcess.emit (events.js:191:7) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) 
gyp ERR! System Windows_NT 10.0.14393 
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:\test1\node_modules\orientjs-native 
gyp ERR! node -v v6.9.2 
gyp ERR! node-gyp -v v3.4.0 
gyp ERR! not ok 
[email protected] C:\test1 
`-- [email protected] 
    +-- [email protected] 
    +-- [email protected] 
    +-- [email protected] 
    | +-- [email protected] 
    | `-- [email protected] 
    +-- [email protected] 
    | +-- [email protected] 
    | `-- [email protected] 
    | `-- [email protected] 
    |  +-- [email protected] 
    |  +-- [email protected] 
    |  +-- [email protected] 
    |  | `-- [email protected] 
    |  `-- [email protected] 
    |  `-- [email protected] 
    |   `-- [email protected] 
    +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | | +-- [email protected] 
    | | | +-- [email protected] 
    | | | +-- [email protected] 
    | | | +-- [email protected] 
    | | | | `-- [email protected] 
    | | | +-- [email protected] 
    | | | `-- [email protected] 
    | | +-- [email protected] 
    | | | `-- [email protected] 
    | | `-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | | `-- [email protected] 
    | | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | | +-- [email protected] 
    | | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | +-- [email protected] 
    | | `-- [email protected] 
    | `-- [email protected] 
    `-- [email protected] 
    `-- [email protected] 

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\orientjs-native): 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] install: `node-gyp rebuild` 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 

回答

0

在我的情況下,問題是在非拉丁(在我的情況西里爾文)中的路徑,我的用戶文件夾字符(其實我有西裏爾字母的用戶名)。嘗試在其名稱中使用僅包含拉丁字符的新用戶,並檢查在其他合理路徑中是否有任何非拉丁字符。