我正在尝试使用以下命令为bot测试框架安装一个名为'botium-cli'的节点包:
npm install -g botium-cli
在Windows服务器计算机上(Windows Server 2008)。
我一再遇到不同类型的node-gyp错误。 我知道node-gyp问题在各种论坛上都很受欢迎,我已经尝试了很多建议,但错误并没有消失。
到目前为止,我已尝试过以下内容:
我遇到这个问题超过5-7天了,我一直在尝试在4台不同的机器上安装这个软件包,但是node-gyp总是挡不住。
错误消息中突出显示的部分是:
build / binding.sln(1):解决方案文件错误MSB5014:文件格式版本 不被承认。 MSBuild只能读取解决方案文件 版本7.0和9.0,包括在内。
以下是错误的完整日志:
> > npm WARN deprecated nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
> C:\Users\dkarkala\AppData\Roaming\npm\botium-cli ->
> C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\bin\botium-cli.js
>
> > grpc@1.11.3 install C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_modules\grpc
> > node-pre-gyp install --fallback-to-build --library=static_library
>
> node-pre-gyp WARN Tried to download(400):
> https://storage.googleapis.com/grpc-precompiled-binaries/node/grpc/v1.11.3/node-v57-win32-x64-unknown.tar.gz
>
> node-pre-gyp WARN Pre-built binaries not found for grpc@1.11.3 and
> node@8.11.2 (node-v57 ABI, unknown) (falling back to source compile
> with node-gyp)
>
> build/binding.sln(1): Solution file error MSB5014: File format version
> is not recognized. MSBuild can only read solution files between
> versions 7.0 a nd 9.0, inclusive. gyp ERR! build error gyp ERR! stack
> Error: `msbuild` failed with exit code: 1 gyp ERR! stack at
> ChildProcess.onExit
> (C:\Users\dkarkala\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
> gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at
> ChildProcess.emit (events.js:214:7) gyp ERR! stack at
> Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
> gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "C:\\Program
> Files\\nodejs\\node.exe"
> "C:\\Users\\dkarkala\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\no
> de-gyp.js" "build" "--fallback-to-build" "--library=static_library"
> "--module=C:\\Users\\dkarkala\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\no
> de_modules\\dialogflow\\node_modules\\grpc\\src\\node\\extension_binary\\node-v57-win32-x64-unknown\\grpc_node.node"
> "--module_name=grpc_node" "--modu
> le_path=C:\\Users\\dkarkala\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\node_modules\\dialogflow\\node_modules\\grpc\\src\\node\\extension_binar
> y\\node-v57-win32-x64-unknown" "--napi_version=3"
> "--node_abi_napi=napi" gyp ERR! cwd
> C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_modules\grpc
> gyp ERR! node -v v8.11.2 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok
> node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to
> execute 'C:\Program Files\nodejs\node.exe
> C:\Users\dkarkala\AppData\Roaming\npm\node_modules\npm\node_modules
> \node-gyp\bin\node-gyp.js build --fallback-to-build
> --library=static_library --module=C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\no
> de_modules\dialogflow\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node
> --module_name=grpc_node --module_path=C:\U sers\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unkno
> wn --napi_version=3 --node_abi_napi=napi' (1) node-pre-gyp ERR! stack
> at ChildProcess.<anonymous>
> (C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_mo
> dules\grpc\node_modules\node-pre-gyp\lib\util\compile.js:83:29)
> node-pre-gyp ERR! stack at emitTwo (events.js:126:13) node-pre-gyp
> ERR! stack at ChildProcess.emit (events.js:214:7) node-pre-gyp
> ERR! stack at maybeClose (internal/child_process.js:925:16)
> node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit
> (internal/child_process.js:209:5) node-pre-gyp ERR! System Windows_NT
> 6.1.7601 node-pre-gyp ERR! command "C:\\Program Files\\nodejs\\node.exe"
> "C:\\Users\\dkarkala\\AppData\\Roaming\\npm\\node_modules\\botium-cli\\node_modules\\d
> ialogflow\\node_modules\\grpc\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp"
> "install" "--fallback-to-build" "--library=static_library"
> node-pre-gyp ERR! cwd
> C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_modules\grpc
> node-pre-gyp ERR! node -v v8.11.2 node-pre-gyp ERR! node-pre-gyp -v
> v0.10.0 node-pre-gyp ERR! not ok Failed to execute 'C:\Program
> Files\nodejs\node.exe
> C:\Users\dkarkala\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js
> build --fallback-to-build --library=static_library
> --module=C:\Users\dkarkala\AppData\Roaming\npm\node_modules\botium-cli\node_modules\dialogflow\node_modu
> les\grpc\src\node\extension_binary\node-v57-win32-x64-unknown\grpc_node.node
> --module_name=grpc_node --module_path=C:\Users\dkarkala\AppData\Roaming\n pm\node_modules\botium-cli\node_modules\dialogflow\node_modules\grpc\src\node\extension_binary\node-v57-win32-x64-unknown
> --napi_version=3 --node_abi_ napi=napi' (1) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! grpc@1.11.3 install: `node-pre-gyp install
> --fallback-to-build --library=static_library` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the grpc@1.11.3 install script. npm ERR!
> This is probably not a problem with npm. There is likely additional
> logging output above.
>
> npm ERR! A complete log of this run can be found in: npm ERR!
> C:\Users\dkarkala\AppData\Roaming\npm-cache\_logs\2018-05-16T12_31_16_928Z-debug.log
修改 我在尝试安装以下软件包时遇到了完全相同的问题:
npm i dialogflow --save