无法下载msnodesql

编程入门 行业动态 更新时间:2024-10-06 06:46:55

<a href=https://www.elefans.com/category/jswz/34/1751639.html style=无法下载msnodesql"/>

无法下载msnodesql

我无法安装msnodesql。

最初我尝试过

npm install node-sqlserver

...这将警告它已被msnodesql取代。

我已经成功安装了Node.js,iisnode,并且看到示例Hello.js已被提供(很好,是的,所以至少node和iisnode都在工作。

我安装了前提条件:

Node.js - use the latest version if possible, but it has been tested on node 0.6.10 and later
node-gyp - latest version installed globally (npm install -g node-gyp)
python 2.7.x - for node-gyp (make sure it is in the path)
Visual C++ 2010 - the Express edition is freely available from Microsoft
SQL Server Native Client 11.0 - available as Microsoft SQL Server 2012 Native Client found in the SQL Server 2012 Feature Pack

...当我运行它时,我得到:

npm install msnodesql

npm http GET 
npm http 304 

> [email protected] install c:\nodejs\node_modules\msnodesql
> node scripts/install.js

You are downloading Microsoft Driver for Node.js for SQL Server from
Microsoft, the license agreement to which is available at

8AB6-41E616035147/EULA.rtf and in the project folder to which the
software is downloaded. Check the package for additional dependencies, which
may come with their own license agreement(s). Your use of the package and
dependencies constitutes your acceptance of their license agreements. If
you do not accept the license agreement(s), then delete the relevant
components from your device.
install.js: Unable to download msnodesql-0.2.1-v0.10-x64.msi
npm ERR! weird error 1
npm ERR! not ok code 0

我使用许可证密钥注册了C ++,所以,有人可以告诉我我在这里缺少什么吗?

请在这里请问noob问题,但是我不得不问,如何“检查程序包中是否存在其他依赖项”?到底指的是什么?

回答如下:

发生此问题的原因是,在scripts / install.js的目标包中,驱动程序的URL无效。实际上,在Microsoft下载上,您会找到msnodesql-0.2.1-v0.8-x64.msi,但找不到脚本中指向的msnodesql-0.2.1-v0.10-x64.msi。纠正它的唯一方法是从本地驱动器安装它。

与http://www.microsoft/en-us/download/details.aspx?id=29995分开下载驱动器。然后,我建议您:

  1. 从下载Git Hub (msnodesql)拉链包装。将其解压缩到本地驱动器
  2. 在解压缩的目录中替换

    的内容
    scripts/install.js
    

    如下所示:

    var assert=require('assert');
    var subprocess=require('child_process');
    var package=require('../package.json');
    
    function log( msg ) {
        console.log( "install.js: " + msg );
    }
    console.log( "You are installing driver locally." );
    
    var msiName = 'HERE_IS_THE_PATH_TO_YOUR_DOWNLOADED_DRIVER\\msnodesql-0.2.1-v0.8-x64.msi';
    // run the msi to extract the driver inside
    var msiCmd = [ 'cmd', '/c', 'msiexec', '/i', msiName, '/quiet','IACCEPTMSNODESQLLICENSETERMS=Yes', 'NPMINSTALL=Yes' ].join(' ');
    subprocess.exec( msiCmd, function( error, stdout, stderr ) {
        if( error !== null ) {
        log( error );
        log( stdout );
        process.exit( 1 );
        }
    });
    

然后开始运行

npm install FULL_PATH_TO_UNZIPPED_PACKAGE_DIR

安装过程不应失败。在您应用的模块文件夹中,将出现一个

      msnodesql

包装。然后,您应该下载(如果不是您自己建造的)

sqlserver.node

从Git Hub(我的声誉不允许向我发布链接,因此,如果需要,我会回复它)并将其放置到]]

libmsnodesql

模块目录的文件夹。这应该对您有帮助。

更多推荐

无法下载msnodesql

本文发布于:2024-05-07 21:34:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1757348.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:无法下载   msnodesql

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!