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

Installing jsbin via NPM on Windows 7 x64 #353

Closed
crfroehlich opened this issue Sep 28, 2012 · 25 comments
Closed

Installing jsbin via NPM on Windows 7 x64 #353

crfroehlich opened this issue Sep 28, 2012 · 25 comments

Comments

@crfroehlich
Copy link

I'm trying to install jsbin using the command:

npm install -g jsbin

My first error was issue #338, which I resolved by adding Git (/bin) to my PATH. Then I hit the issue with bcrypt #94, which I solved by installing OpenSSL-Win32 (and OpenSSL-Win64 for good measure) and adding them (/lib and /bin) to my PATH.

From there, I updated my Python 2.7.3 to 2.75. I installed SQLite WIndows (and sqlite3 in node). I already had the Windows 7.1 SDK and Visual Studio 2010 and Visual Studio 2012 installed, but I also installed the C++ 2005, 2008, 2010 and 2012 (x86 and 84) libraries. I ran Windows Update. I also installed the Visual Studio 2010 C++ Express edition as recommended by other posts.

Nothing so far has prevailed. I should note I can install various other packages without issue (Grunt, Brunch, Yeoman, etc).

This is the result of my last attempt, running:

npm -dd install -g jsbin

Any hope?

NOTE: the npm-debug.log does not appear to fully reflect all of the errors I see in the command prompt (which I cannot see all of much less copy/paste, because this is Windows). Nonetheless, log begins: https://gist.github.com/3805457

@tgvashworth
Copy link
Member

Could you edit to put the npm output into a gist and then link to it?

What errors are you getting now?

@crfroehlich
Copy link
Author

Sure, I put everything I could get into the gist above. If there's a better way to capture all of the output show in the windows command prompt than > log.txt, let me know.

@tgvashworth
Copy link
Member

Hmm.

There's a couple of things you could try. I'm not too hot on Windows so you might have to adapt this...

Clone the whole repo, npm install and then run it like that:

git clone git://github.com/remy/jsbin.git
cd jsbin && npm install
grunt run

Or, maybe try installing each of JSBin's dependencies individually and see if one of those errors.

@remy might have a better opinion on this than me!

@remy
Copy link
Member

remy commented Sep 30, 2012

From what I currently know, the sqlite modules don't compile - but it might
be some other module that's causing it to fail on the general npm install -g jsbin.

For the very short term, the only solution I can suggest is using a virtual
machine on windows. But this is a priority for me to make JS Bin work
across all three platforms - but it's not a quick solution! :)

@crfroehlich
Copy link
Author

@remy I've already insulated myself against this somewhat--all of my dev environments are in VMs. Alas, they're all Windows VMs running on a Windows host. I've been punting on the need to image my host and install the linux distro de jour, but it's been low priority. Spinning up a Linux VM, though, is trivial.

@PhUU I'll scrape some time together this week and give that a stab.

@tgvashworth
Copy link
Member

Sounds good. I would crack out a Windows VM but I don't have any on this computer to play with, sorry!

@crfroehlich
Copy link
Author

@PhUU I can install of of jsbin's dependencies without error. sqlite3 throws a lot of warnings, but it succeeds. Once done, I get the same series of errors from

npm install -g jsbin

Cloning jsbin and installing locally yields the same results.

The VM solution works; however, I can't get my team on board until there's a working Windows version. Thanks for the help; I'll wait for a proper Windows fix.

@remy
Copy link
Member

remy commented Oct 4, 2012

I'd like to get jsbin working on windows too - so we'll be looking at this next week to narrow down what's causing the issues.

@danactive
Copy link

I'm also unable to install the latest master on Windows 7 64-bit and Windows Server 2008 R2 64-bit

@cetchells
Copy link

I have this working on windows, the problem I think is bcrypt, I compiled it myself from the latest v0.7.3. However I now have an sqlite error:
{"error":{"message":"SQLITE_ERROR: table owners has no column named html","stack":"Error: SQLITE_ERROR: table owners has no column named html","errno":1,"code":"SQLITE_ERROR"}
Now the table owners does have no column html, should it?

@remy
Copy link
Member

remy commented Jan 11, 2013

@PhUU - can you update the full-v3 sql and add a separate SQL patch for the
owners update.

On 11 January 2013 09:03, cetchells notifications@github.com wrote:

I have this working on windows, the problem I think is bcrypt, I compiled
it myself from the latest v0.7.3. However I now have an sqlite error:
{"error":{"message":"SQLITE_ERROR: table owners has no column named
html","stack":"Error: SQLITE_ERROR: table owners has no column named
html","errno":1,"code":"SQLITE_ERROR"}
Now the table owners does have no column html, should it?


Reply to this email directly or view it on GitHubhttps://github.com/remy/jsbin/issues/353#issuecomment-12136406.

@cetchells
Copy link

For the record, its working winxp 32bit. I'm running it under node 0.8.14. I have Visual Studio c++ express.
Which I think does all the compiling for bcrypt, sqlite, see below for more info.
https://github.com/TooTallNate/node-gyp
"For 64-bit builds of node and native modules you will also need the Windows 7 64-bit SDK"

I also installed openssl http://slproweb.com/products/Win32OpenSSL.html

@remy
Copy link
Member

remy commented Jan 11, 2013

@cetchells it's because the sqlite table structure is out of date to the latest code. @PhUU is working on it now to get a fix up to github that you can apply to your database to fix the issue.

@tgvashworth
Copy link
Member

@cetchells I've added an upgrade file that you can run against the jsbin database. I'll write some instructions on how to do that if you need!

@cetchells
Copy link

Yes, I got that. It's fixed.
I just deleted the database and started again.
Thanks, much appreciated...

@cetchells
Copy link

I got this to build in win8 64bit. You need 64bit open ssl from here:
http://slproweb.com/products/Win32OpenSSL.html
and Visual C++ 2008 Redistributables (x64)
Upgrade bcrypt in json.package to v0.7.3
npm install
@remy maybe bump bcrypt up to 0.7.3 seems to work better on windows (32bit and 64 bit)

@crfroehlich
Copy link
Author

Jsbin installation still fails for me on Windows 7x64. I have the same environment as previously reported. The log for this run is at https://gist.github.com/bc3c77f5694c7858b5a7. jsbin

If I clone jsbin and manually set the bcrypt depency to 0.7.3 as @cetchells noted, the installation does succeed; however, I get this error when trying to exec 'jsbin':

C:\Users\me\Downloads\jsbin-master>jsbin

C:\Users\me\AppData\Roaming\npm\node_modules\jsbin\lib\store.js:9
if (!adapter[method]) throw new Error("DB adapter missing method: " + meth
^
Error: DB adapter missing method: archiveBin
at check (C:\Users\me\AppData\Roaming\npm\node_modules\jsbin\lib\store.j
s:9:33)
at Array.forEach (native)
at check (C:\Users\me\AppData\Roaming\npm\node_modules\jsbin\lib\store.j
s:8:11)
at new Store (C:\Users\me\AppData\Roaming\npm\node_modules\jsbin\lib\sto
re.js:4:3)
at createStore (C:\Users\me\AppData\Roaming\npm\node_modules\jsbin\lib\s
tore.js:55:10)
at Object. (C:\Users\me\AppData\Roaming\npm\node_modules\jsbi
n\lib\app.js:9:36)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)

@ghost ghost assigned tgvashworth Jan 31, 2013
@cetchells
Copy link

@somecallmechief It looks like this is a bug - Method archiveBin is missing from lib/db/sqlite.js. To fix it up just add
it manually ,archiveBin:function(){} (This will get over but not fix the error)
Maybe a feature not yet implemented.

@remy
Copy link
Member

remy commented Feb 1, 2013

That's right - it was added to the mysql adapter, but missed on the sqlite
adapter.

On 1 February 2013 09:01, cetchells notifications@github.com wrote:

@somecallmechief https://github.com/somecallmechief It looks like this
is a bug - Method archiveBin is missing from lib/db/sqlite.js. To fix it up
just add
it manually ,archiveBin:function(){} (This will get over but not fix the
error)
Maybe a feature not yet implemented.


Reply to this email directly or view it on GitHubhttps://github.com/remy/jsbin/issues/353#issuecomment-12985931.

@mibamur
Copy link

mibamur commented Dec 16, 2013

Windows users (linux and osx maybe too) must try install node-gyp with dependency first (openssl and so on https://github.com/TooTallNate/node-gyp)

  • then try npm install bcrypt standalone - 90% it will fail

why?

as you can see problem near node-gyp, node-gyp try build native (C,C++) modules for sqlite and bcrypt

npm install -g jsbin did not helps you, forget it

you can (must)

git clone https://github.com/remy/jsbin.git
cd jsbin
  • then you must replace bcrypt dependency with javascript implemintation bcryptjs from packages.json
  • then in lib/models/user.js
 //   bcrypt = require('bcrypt'),
    bcrypt = require('bcryptjs'),
  • then you can try npm install

if you still have errors in console -> this is sqlite3 native library too

  • remove sqlite3 dependency from packages.json (like bcrypt), but then you must set mysql instead sqlite in config.default.json
...
"adapter": "mysql",
...

as i know mysql have no node-gyp dependency
of course you must have mysql server set user and password in config.default.json too

  • repeat npm install

if all fine? bin/jsbin

let general contributor say: Am I right or not? :)

PS
you can fork jsbin, make changes in own git and then
npm install -g https://isaacs@github.com/isaacs/jsbin.git for example

PPS
it solve me
hope will help someone else

@woojoo666
Copy link

THANKS @mibamur !!! Worked for me on windows 8.1!

@pettyalex
Copy link

@mibamur has a solution that works, but I would prefer to use sqlite over mysql. Even when I have updated and installed sqlite3 to the latest version and built it properly I'm getting "Warning: Something went wrong while saving."

@remy
Copy link
Member

remy commented Feb 25, 2014

Windows and Mavericks installs via npm are now all working (as of version 3.11.23).

@remy remy closed this as completed Feb 25, 2014
@neechange
Copy link

windows10 node4.4.2 可以安装吗

@ednja
Copy link

ednja commented Jan 29, 2022

The documentation says to install nodejs. I downloaded nodejs and the website said that it was for Windows 7. When I tried installing it, I got error saying that it won't install on anything less than Windows 8.1. Were you able to install nodejs on your Windows 7? If so, how?

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

No branches or pull requests

10 participants