1

Can you plese guide to resolve the error I am getting?

Ater running this on my local environment npm install node-sqlserver

I am getting this error at the end:

gyp ERR! build error gyp ERR! stack Error: `msbuild` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\ npm\node_modules\node-gyp\lib\build.js:267:23) 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:\\Program Files\\nodejs\\node_modules\\npm\\node_modu les\\node-gyp\\bin\\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\Felipe\AppData\Roaming\npm\node_modules\node-sqlserver gyp ERR! node -v v0.10.24 gyp ERR! node-gyp -v v0.12.1 gyp ERR! not ok npm ERR! [email protected] install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script. npm ERR! This is most likely a problem with the node-sqlserver 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 node-sqlserver npm ERR! There is likely additional logging output above. npm ERR! System Windows_NT 6.2.9200 npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod ejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-sqlserver" "-g" npm ERR! cwd C:\ 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:\npm-debug.log npm ERR! not ok code 0 

Update 1

All prerequisites has been run, this is occurs on the last step:

I also tried downlaoding the package from here:

http://www.microsoft.com/en-us/download/details.aspx?id=29995

4
  • Are you able to install any other package? For example does npm install mongodb give any error? Commented Feb 19, 2014 at 18:44
  • yes, I installed express, karma, etc. I am running node just fine until now Commented Feb 19, 2014 at 18:50
  • I run the command in my cmd and I get an error as well. ( the same one to be more exact). I think as the error says that it might be a problem with the package. Also did you make sure that you have all of the prerequisites installed? The python in the class path? node-gyp? All of them are in the page of the repo in github Commented Feb 19, 2014 at 18:52
  • You can also download precompiled module from node-sqlserver-binary. Commented Feb 25, 2014 at 20:24

2 Answers 2

2

I had this issue as well. In the end I switched to this driver: https://github.com/patriksimek/node-mssql

Sign up to request clarification or add additional context in comments.

Comments

0

As I said in the comments. Are you sure that you have all the prerequisites that the package needs?

The following prerequisites are necessary prior to using the driver:

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

I took this from the github page.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.