Installation fails through npm #153

Closed
awayken opened this Issue Dec 16, 2013 · 13 comments

Projects

None yet

4 participants

@awayken
awayken commented Dec 16, 2013

The error message is:
install.js: Unable to download msnodesql-0.2.1-v0.10-x64.msi

Looking into install.js, I can't browse to the URL it creates to download the file myself. It seems like the download URL must be wrong or (just as likely) there's something configured in our company firewall that it throwing things off.

Full output:

install.js: Unable to download msnodesql-0.2.1-v0.10-x64.msi
npm ERR! msnodesql@0.2.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.1 install script.
npm ERR! This is most likely a problem with the msnodesql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls msnodesql
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "msnodesql"
npm ERR! cwd D:\Sites
npm ERR! node -v v0.10.22
npm ERR! npm -v 1.3.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\Sites\npm-debug.log
npm ERR! not ok code 0

If it'll help, I can post the contents of the npm-debug.log file. Just let me know.

I'm running node v 0.10.22 and npm v 1.3.14

@jlertle
jlertle commented Jan 8, 2014

same

@matthewkastor

No firewall issues here. A quick google search reveals the driver is currently located at http://www.microsoft.com/en-us/download/details.aspx?id=29995

C:\Users\kastor\Desktop\experiments\gp-image-adder>npm install -save msnodesql
npm http GET https://registry.npmjs.org/msnodesql
npm http 304 https://registry.npmjs.org/msnodesql

> msnodesql@0.2.1 install C:\Users\kastor\Desktop\experiments\gp-image-adder\nod
e_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
http://download.microsoft.com/download/6/E/2/6E2D7972-E54D-45AA-
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-ia32.msi
npm ERR! msnodesql@0.2.1 install: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the msnodesql@0.2.1 install script.
npm ERR! This is most likely a problem with the msnodesql package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node scripts/install.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls msnodesql
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-save" "msnodesq
l"
npm ERR! cwd C:\Users\kastor\Desktop\experiments\gp-image-adder
npm ERR! node -v v0.10.24
npm ERR! npm -v 1.3.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\kastor\Desktop\experiments\gp-image-adder\npm-debug.log
npm ERR! not ok code 0
@matthewkastor

Node v 10 is not supported by the driver according to the download page http://www.microsoft.com/en-us/download/details.aspx?id=29995

"
System Requirements
Supported Operating System

Windows 7, Windows Server 2008 R2, Windows Server 2008 Service Pack 2, Windows Vista Service Pack 2

    Node.JS Runtime 0.6 or 0.8
    Microsoft SQL Server 2012 Native Client available in the SQL Server 2012 Feature Pack.
    Any edition of SQL Server 2005 or later.

"

@jlertle
jlertle commented Jan 11, 2014

You have to compile from source (which is a bit of a pain). I was able to compile it after a few hours of troubleshooting. They should really have it pre-compiled...

@jlertle
jlertle commented Jan 11, 2014

BTW, It's really not that great anyway. I eventually went with https://github.com/patriksimek/node-mssql

@matthewkastor

Weird, npm and node-gyp are all set up so modules can be compiled on install. I was checking out node-mssql too but I didn't see any documentation on prepared statements. The only module I could find for SQL Server that said it supports them is node-tds but I haven't tried it yet. It looks like it was abandoned 2 years ago anyway. It sucks that there's not better support for SQL Server because it's already installed on so many windows machines. I'm going to take your advice and skip screwing around trying to compile this though.

@jlertle
jlertle commented Jan 12, 2014

There are quite a few files that you need to move around and some edits to
the actual code. If I could remember I'd tell ya.... I could send you my
compiled module if you like. That would at least make all the hassle I went
thru worth it ;-)

Thanks,
Jason Lee Ertle
727.537.9787

-(°_o)/¯

-Sent from my TI-99/4A

On Sat, Jan 11, 2014 at 10:07 PM, Matthew Kastor
notifications@github.comwrote:

Weird, npm and node-gyp are all set up so modules can be compiled on
install. I was checking out node-mssql too but I didn't see any
documentation on prepared statements. The only module I could find for SQL
Server that said it supports them is node-tds but I haven't tried it yet.
It looks like it was abandoned 2 years ago anyway. It sucks that there's
not better support for SQL Server because it's already installed on so many
windows machines. I'm going to take your advice and skip screwing around
trying to compile this though.


Reply to this email directly or view it on GitHubhttps://github.com/WindowsAzure/node-sqlserver/issues/153#issuecomment-32113973
.

@matthewkastor

lolz. Nah, it's alright. You already said it's not so great and if I made something cool it's not like other people are going to be able to install it. Maybe if you can figure out what sort of black magic goes into setting up compilation at install time then you could make a better module or a pull request to this. :D

@jorgeazevedo

This is fixed by #157 .

@matthewkastor

I'd test this but I don't have visual studio anymore and I've switched to 32 bit node because there were a lot of modules that weren't compatible with 64 bit. I don't even remember what my setup was back then. I'm getting a different error, but I've got a completely different setup now.

install.js: Unable to download msnodesql-0.2.1-v0.10-ia32.msi

I've pretty much given up on the idea of using SQL Server with node. It would be cool to do but I don't know if it's going to make anyone any money so I don't have my hopes up.

@jorgeazevedo

Well, I just noticed that it was addressing the issue you brought up so I thought I'd leave a comment.

By the way, if you ever need to use SQL Server, I put up a binary version of this driver up on npm that might come in handy.

@matthewkastor

Hey now, that's cool. :D That's something people could use and reliably depend on. Maybe they'll pick it up for Webmatrix?

@jorgeazevedo

:-) One can hope! This node stuff is very low priority for the microsoft team right now, but maybe it will change in the future.

@awayken awayken closed this Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment