Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js 如何为nodejs安装win32ole(即使node gyp正常工作)_Node.js_Installation_Windows 7 X64_Win32ole - Fatal编程技术网

Node.js 如何为nodejs安装win32ole(即使node gyp正常工作)

Node.js 如何为nodejs安装win32ole(即使node gyp正常工作),node.js,installation,windows-7-x64,win32ole,Node.js,Installation,Windows 7 X64,Win32ole,对不起,我是nodejs的新手。我想在Windows7下的nodejs中尝试使用程序包win32ole,但是当我在以管理员身份打开的命令提示符窗口中运行安装命令npm install win32ole时,会弹出许多错误 我的配置是: Windows 7 64位(版本6.1.7601) Microsoft Visual Studio Express 2015 for Windows Desktop-chs(imho必须安装20GB的软件才能使node gyp正常工作,这就像是对某个IT型号的失败

对不起,我是nodejs的新手。我想在Windows7下的nodejs中尝试使用程序包
win32ole
,但是当我在以管理员身份打开的命令提示符窗口中运行安装命令
npm install win32ole
时,会弹出许多错误

我的配置是:

  • Windows 7 64位(版本6.1.7601)
  • Microsoft Visual Studio Express 2015 for Windows Desktop-chs(imho必须安装20GB的软件才能使node gyp正常工作,这就像是对某个IT型号的失败认证)
  • Microsoft.NET Framework 4.6
  • Python 2.7.9和3.4.3都已安装,但我将
    Python
    命令指向了2.7.9
  • nodejs版本4.2.1
  • npm版本2.14.7
  • 节点gyp 3.0.3
  • PYTHON
    环境变量设置为
    C:\Python27\PYTHON.exe
  • 告诉
    node-gyp
    使用命令
    node-gyp--Python C:\Python27\
  • 告诉
    npm
    在何处使用命令
    npm config set Python C:\Python27\Python.exe查找Python
以下是控制台输出:

C:\Windows\system32
>npm install win32ole
Impossibile trovare il percorso specificato.
npm WARN engine win32ole@0.1.3: wanted: {"node":">= 0.8.18 && < 0.9.0"} (current: {"node":"4.2.1","npm":"2.14.7"})
\
> ref@1.2.0 install C:\Windows\system32\node_modules\win32ole\node_modules\ref
> node-gyp rebuild


C:\Windows\system32\node_modules\win32ole\node_modules\ref
>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 )
Impossibile trovare il percorso specificato.
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:355:16)
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_process.js:200:12)
gyp ERR! System Windows_NT 6.1.7601
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:\Windows\system32\node_modules\win32ole\node_modules\ref
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.0.3
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.2.1
npm ERR! npm  v2.14.7
npm ERR! code ELIFECYCLE

npm ERR! ref@1.2.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ref@1.2.0 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 their info via:
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:\Windows\system32\npm-debug.log
C:\Windows\system32
>npm安装win32ole
不可能的特洛瓦雷·伊尔·珀科索。
警告引擎win32ole@0.1.3:通缉:{“节点”:“>=0.8.18&&<0.9.0”}(当前:{“节点”:“4.2.1”,“npm”:“2.14.7”})
\
> ref@1.2.0安装C:\Windows\system32\node\u modules\win32ole\node\u modules\ref
>节点gyp重建
C:\Windows\system32\node\u modules\win32ole\node\u modules\ref
>如果未定义npm\u config\u node\u gyp(节点“C:\Program Files\nodejs\node\u modules\npm\bin\node gyp bin\\\\\\\..\node\u modules\node gyp\bin\node gyp.js”重建)其他(节点重建)
不可能的特洛瓦雷·伊尔·珀科索。
gyp:调用'node-e'require('nan')“'返回退出状态1。在尝试加载binding.gyp时
哎呀!配置错误
哎呀!堆栈错误:`gyp`失败,退出代码:1
哎呀!堆栈在ChildProcess.onCpExit(C:\Program Files\nodejs\node\u modules\npm\node\u modules\node gyp\lib\configure.js:355:16)
哎呀!在emitTwo处堆栈(events.js:87:13)
哎呀!ChildProcess.emit处的堆栈(events.js:172:7)
哎呀!在Process.ChildProcess.\u handle.onexit(internal/child\u Process.js:200:12)处堆栈
哎呀!系统Windows\u NT 6.1.7601
哎呀!命令“C:\\Program Files\\nodejs\\node.exe”C:\\Program Files\\nodejs\\node\u modules\\npm\\node\u modules\\node gyp\\bin\\node gyp.js“重建”
哎呀!cwd C:\Windows\system32\node\u modules\win32ole\node\u modules\ref
哎呀!节点-v4.2.1
哎呀!节点gyp-v3.0.3
哎呀!不好
npm错误!Windows NT 6.1.7601
npm错误!argv“C:\\Program Files\\nodejs\\node.exe”“C:\\Program Files\\nodejs\\node\u modules\\npm\\bin\\npm cli.js”“安装”“win32ole”
npm错误!节点v4.2.1
npm错误!npm v2.14.7
npm错误!代码失效循环
npm错误!ref@1.2.0安装:`node gyp rebuild`
npm错误!退出状态1
npm错误!
npm错误!失败ref@1.2.0安装脚本“节点gyp重建”。
npm错误!这很可能是ref包的问题,
npm错误!与npm本身无关。
npm错误!告诉作者此操作在您的系统上失败:
npm错误!节点gyp重建
npm错误!您可以通过以下方式获取他们的信息:
npm错误!npm所有者ls ref
npm错误!上面可能还有其他日志输出。
npm错误!请在任何支持请求中包括以下文件:
npm错误!C:\Windows\system32\npm-debug.log
关于我做错了什么有线索吗

跟进


我想我没有做错什么,Windows下的包
节点gyp
,正如在评论中指出的,有一些问题:

首先,由于节点版本,您有一个警告

npm WARN engine win32ole@0.1.3: wanted: {"node":">= 0.8.18 && < 0.9.0"} (current: {"node":"4.2.1","npm":"2.14.7"})

使用最新的node.js版本是不可能的


win32ole
安装之前使用I手动安装的
node gyp
,但错误仍然存在。查看我的更新问题。您是否尝试使用旧版本的node,只是为了查看新版本是否导致问题?我这么说是因为作者明确规定了一个上限。之后,我意识到试图让
节点gyp
工作只是浪费时间。无论如何,谢谢。我从来没有遇到过问题,但我已经安装了许多windows sdk和所有.Net运行时
npm install -g node-gyp