我想在以下环境中使用orientjs。


Windows 10专业版64位
节点v6.9.2
node-gyp v3.4.0
orientjs 2.2.4


1)安装“ windows-build-tools”

$ 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


kt@KT-HOME 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

最佳答案

在我的情况下,问题出在用户文件夹路径中的非拉丁字符(在我的情况下为西里尔文)字符(实际上我有西里尔文用户名)。尝试创建名称中仅包含拉丁字符的新用户,并检查其他明智路径中是否有非拉丁字符。

08-28 11:03