sql-server - msnodesql 模块在编译期间出现错误

标签 sql-server node.js azure express azure-sql-database

 C:\Python27>node-gyp configure
 gyp info it worked if it ends with ok
 gyp info using <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="2a44454e4f074d535a6a1a041b1b041a" rel="noreferrer noopener nofollow">[email protected]</a>
 gyp info using <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="5a34353e3f1a6a746b6a74686b" rel="noreferrer noopener nofollow">[email protected]</a> | win32 | ia32
 gyp info spawn python
 gyp info spawn args [ 'C:\\Users\\v-javde\\AppData\\Roaming\\npm\\node_modules\\
 node-gyp\\gyp\\gyp',
 gyp info spawn args   'binding.gyp',
 gyp info spawn args   '-f',
 gyp info spawn args   'msvs',
 gyp info spawn args   '-G',
 gyp info spawn args   'msvs_version=auto',
 gyp info spawn args   '-I',
 gyp info spawn args   'C:\\Python27\\build\\config.gypi',
 gyp info spawn args   '-I',
 gyp info spawn args   'C:\\Users\\v-javde\\AppData\\Roaming\\npm\\node_modules\\
 node-gyp\\addon.gypi',
 gyp info spawn args   '-I',
 gyp info spawn args   'C:\\Users\\v-javde\\.node-gyp\\0.10.21\\common.gypi',
 gyp info spawn args   '-Dlibrary=shared_library',
 gyp info spawn args   '-Dvisibility=default',
 gyp info spawn args   '-Dnode_root_dir=C:\\Users\\v-javde\\.node-gyp\\0.10.21',
 gyp info spawn args   '-Dmodule_root_dir=C:\\Python27',
 gyp info spawn args   '--depth=.',
 gyp info spawn args   '--generator-output',
 gyp info spawn args   'C:\\Python27\\build',
 gyp info spawn args   '-Goutput_dir=.' ]
 gyp: binding.gyp not found (cwd: C:\Python27) 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:\Users\v-javde\AppData\Roaming\np
 m\node_modules\node-gyp\lib\configure.js:467:16)
 gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
 gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:
 12)
 gyp ERR! System Windows_NT 6.2.9200
 gyp ERR! command "node" "C:\\Users\\v-javde\\AppData\\Roaming\\npm\\node_modules
 \\node-gyp\\bin\\node-gyp.js" "configure"
 gyp ERR! cwd C:\Python27
 gyp ERR! node -v v0.10.21
 gyp ERR! node-gyp -v v0.11.0
 gyp ERR! not ok

我只有两个主要要求。 1. Azure SQL 2. NodeIIS,我在网上看到一些教程可以用,但是当我尝试时却失败了。我想这可能是由于最新的node.js版本...我当前运行的是v0.10.21,我尝试了32位和64位,但没有成功。

有没有人成功使用过这个,你使用什么版本的node.js?

最佳答案

您在错误的目录中运行 node-gyp configure

找到 Node.js 模块的根目录,并在那里执行命令。当存在名为 binding.gyp 的文件时,您就会知道您位于正确的目录中,因为这就是 node-gyp 正在查找的文件。

以下是您自己的错误中的部分内容,对此进行了解释:

gyp: binding.gyp not found (cwd: C:\Python27) while trying to load binding.gyp

关于sql-server - msnodesql 模块在编译期间出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19671664/

相关文章:

node.js - 有人可以解释这个错误 : expression statement is not assignment or call

node.js - 使用 requestSpotInstances 的 TagSpecifications 使用 aws-sdk 的 UnexpectedParameter

azure - 为什么 Azure Functions 在调试器中不显示异常?

sql - 将表定义克隆到 SQL Server 中的表变量

node.js - 无法安装 vue-cli,因为 npm 无限循环问题

azure - 使用 azure 函数将文件上传到 blob 存储

Azure Cloud shell 不切换订阅

SQL 显示以前的值,直到给定值更改

sql-server - 用可变数量的空格右填充字符串

SQL Server存储过程,创建函数