Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build node-sqlite3 on Windows using npm 1.1.66 #172

Closed
anta40 opened this issue Dec 5, 2012 · 5 comments
Closed

Cannot build node-sqlite3 on Windows using npm 1.1.66 #172

anta40 opened this issue Dec 5, 2012 · 5 comments

Comments

@anta40
Copy link

anta40 commented Dec 5, 2012

Hi Nate,

I tried to build node-sqlite3 on 32-bit Windows 7 Ultimate (VS 2012 Ultimate, Active Python 2.7.2.5), and failed.
Here are the steps:

  1. Run the VS Command Prompt
  2. npm install -g npm
    npm http GET https://registry.npmjs.org/npm
    npm http 200 https://registry.npmjs.org/npm
    npm http GET https://registry.npmjs.org/npm/-/npm-1.1.68.tgz
    npm http 200 https://registry.npmjs.org/npm/-/npm-1.1.68.tgz
    C:\Users\CSL-NB-064\AppData\Roaming\npm\npm -> C:\Users\CSL-NB-064\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js
    npm@1.1.68 C:\Users\CSL-NB-064\AppData\Roaming\npm\node_modules\npm
  3. npm install https://github.com/TooTallNate/node-sqlite3/tarball/gyp

npm http GET https://github.com/TooTallNate/node-sqlite3/tarball/gyp
npm http 200 https://github.com/TooTallNate/node-sqlite3/tarball/gyp

sqlite3@2.1.1 install C:\Users\CSL-NB-064\node_modules\sqlite3
node-gyp rebuild

C:\Users\CSL-NB-064\node_modules\sqlite3>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_mod
ules\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Platform.targets(35,5): error MSB8020: The builds tools
for Visual Studio 2010 (Platform Toolset = 'v100') cannot be found. To build using the v100 build tools, either click t
he Project menu or right-click the solution, and then select "Update VC++ Projects...". Install Visual Studio 2010 to b
uild using the Visual Studio 2010 build tools. [C:\Users\CSL-NB-064\node_modules\sqlite3\build\deps\sqlite3\sqlite3.vcx
proj]
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe 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:2
36:23)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack at Process._handle.onexit (child_process.js:678:10)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuil
d"
gyp ERR! cwd C:\Users\CSL-NB-064\node_modules\sqlite3
gyp ERR! node -v v0.8.15
gyp ERR! node-gyp -v v0.7.1
gyp ERR! not ok
npm ERR! sqlite3@2.1.1 install: node-gyp rebuild
npm ERR! cmd "/c" "node-gyp rebuild" failed with 1
npm ERR!
npm ERR! Failed at the sqlite3@2.1.1 install script.
npm ERR! This is most likely a problem with the sqlite3 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 sqlite3
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js"
"install" "https://github.com/TooTallNate/node-sqlite3/tarball/gyp"
npm ERR! cwd C:\Users\CSL-NB-064
npm ERR! node -v v0.8.15
npm ERR! npm -v 1.1.66
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\CSL-NB-064\npm-debug.log
npm ERR! not ok code 0

Any idea how to fix this?

@TooTallNate
Copy link
Contributor

Don't use my fork, the upstream node-sqlite3 has all my changes already. So toolset version v100 is MSVS 2010. For 2012, try this:

$ npm install sqlite3 --msvs_version=auto

Or possibly v110 as the msvs version if that doesn't work.

@TooTallNate
Copy link
Contributor

Or actually try it with: --msvs_version=2012

@anta40
Copy link
Author

anta40 commented Dec 6, 2012

I already tried the 3 of them as msvs version, and none of them work. Here's the log:
http://pastebin.com/9LuPJL9f

Previously, I had updated the gyp, as described in https://github.com/TooTallNate/node-gyp/wiki/Updating-npm%27s-bundled-node-gyp

@TooTallNate
Copy link
Contributor

......\deps\sqlite3\sqlite3.c : fatal error C1902: Program database manager mismatch; please check your installation

So it looks like things are working for you at this point. That must be a problem with the sqlite3 module. Please open an Issue on that repo.

@vendethiel
Copy link

Should this be mentioned somewhere is some docs ? Just got on that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants