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

Sails install issue Windows 8.1 node 12 #2884

Closed
Karnith opened this issue Apr 28, 2015 · 27 comments
Closed

Sails install issue Windows 8.1 node 12 #2884

Karnith opened this issue Apr 28, 2015 · 27 comments

Comments

@Karnith
Copy link
Contributor

Karnith commented Apr 28, 2015

Hi,

I'm having an issue with sails install. I have done npm cache clear several times.

https://gist.github.com/Karnith/9f2a0b7fedac9875d194

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

I downloaded the most recent node version 0.12.2 and have the issue. v8 is part of the node msi installer, so I don't know how I would update v8 or why it would need to be updated. I am on windows 8.1 and have visual studio 2013 installed also.

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

It looks like sails-hook-sockets is referencing older socket.io modules and there might have been an issue with them on windows compile...

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

system32 is just the location of the command (cmd) exe for windows. When you open a command window from the exe in the start menu, the location of the exe is where the path starts.

my path for cmd.exe is"

PATH=C:\ProgramData\Oracle\Java\javapath;
D:\Python27\;
D:\Python27\Scripts;
C:\Program Files\ImageMagick-6.9.0-Q16;
c:\program files\graphicsmagick-1.3.20-q8;
C:\Program Files\Broadcom\Broadcom 802.11 Network Adapter;C:\Program Files (x86)\Intel\iCLS Client\;
C:\Program Files\Intel\iCLS Client\;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;
C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;
C:\Program Files\WIDCOMM\Bluetooth Software\;
C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;
C:\ProgramData\chocolatey\bin;
D:\Program Files (x86)\Git\cmd;
D:\Program Files (x86)\Git\bin;
D:\Program Files (x86)\Bitvise SSH Client;
C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;
C:\Program Files\Microsoft\Web Platform Installer\;
D:\Program Files\TortoiseSVN\bin;
D:\Program Files (x86)\WinMerge;
C:\Windows\idmu\common;
D:\Program Files\OpenVPN\bin;
C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;
C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;
C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
D:\Program Files (x86)\Skype\Phone\;
D:\nodejs\;
C:\Users\mmarino\AppData\Local\atom\bin;
D:\gnuwin32\bin;
C:\Users\mmarino\AppData\Roaming\npm

so the real location of node is D:\nodejs.

It's a little bit different than linux/unix systems, so if you haven't ever used a windows pc things would seem a bit odd.

my npm version is 2.7.4 and output of v8 is 3.28.73 (output of node -e "console.log(process.versions.v8)")

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

I could just use linux/unix system for this, but I need my app to be platform agnostic which means that it needs to compile on all platforms. Thanks for the help though...

@particlebanana
Copy link
Contributor

Ok, but npm/node just are known to not work as well on Windows. That's why no one hosts node.js applications on Windows.

I think lots of people would disagree with this. The Azure and the Microsoft folks also helped a bunch with sails-deploy to get sails apps running on Azure.

This isn't a node or npm issue it's the ws module of engine.io trying to install native dependencies. It should work fine without the native compile according to the maintainers but thats a pretty nasty debug log. You said you have Visual Studio 2013 installed the other dependency for node-gyp is Python 2.x. So make sure that's up to date as well.

If so I would try uninstalling sails, running npm cache clear and trying again if it seems a dependency failed to install.

@brandtheisey
Copy link

Have you run npm install --msvs_version = xxxx ?

I have a node / sails app running on Server 2008 and certain modules (I'm looking at you bcrypt) don't like it if I don't specify the visual studio version. Replace the xxxx with whatever year of visual studio you have installed.

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

@tjwebb to answer your question, no. I haven't done anything with sails for months, but have been using node 12 for a while. I just updated to 12.2 since you mentioned that it looked like a v8 issue. Your comment

Ok, but npm/node just are known to not work as well on Windows. That's why no one hosts node.js applications on Windows.

is unjustified. Node was designed to be platform independent. It's developers that break this by using platform specific modules or create platform specific modules.

@particlebanana yes, I've tried npm cache clear several times

@brandtheisey yes, I have tried that also, still same issue.

Looking into it further, it seems several other projects are having this issue with ws. It seems the fix was implemented in new versions that filter up to socket.io. I will try to install the modules themselves and report my findings.

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

ok, ws compiles, at version 0.7.1 (at version 0.5.0 too):

https://gist.github.com/Karnith/e909fd8a83cc5c3f3907

engine.io compiles, notice different ws version 0.5.0:

https://gist.github.com/Karnith/028eca02c9eb09198057

with engine.io there seems to be an issue... The master branch here specifies 1.5.1 with ws 0.7.1, but the npm module references 0.5.0 at version 1.5.1 of engine.io. Not show stopping, but an issue.

socket.io version 1.3.5 has issues compiling:

https://gist.github.com/Karnith/a698e042d857b4a6c8ee

socket.io-client (1.3.5) has an issue compiling (ws@0.4.31):

https://gist.github.com/Karnith/40eda6463fd8f4c7eafc

engine.io-client (1.5.1) has an issue compiling (ws@0.4.31):

https://gist.github.com/Karnith/d0d73addc3ce51304ea5

so it seems socket.io, socket.io-client, engine.io-client need to be updated and sails-hook-sockets reference them.

ws versions need to be updated t be the same. Currently there are three different ones being referenced:
ws@0.7.1 - most recent version
ws@0.5.0
ws@0.4.31

@Karnith
Copy link
Contributor Author

Karnith commented Apr 28, 2015

I was able to fix the compiling by forking the repos and referencing the correct versions of everything in the package.json. So, the npm packages need to be updated with the correct version references to fix this.

socket.io, engin.io-client, socket.io-client compiles:

https://gist.github.com/Karnith/e9a4e35209d52e31ba8e

@tjwebb tjwebb closed this as completed Apr 30, 2015
@Karnith
Copy link
Contributor Author

Karnith commented Apr 30, 2015

@tjwebb are you sure we should close this? I may have fixed the issue temporarily for my case, but others will still have the same issue until sails-hook-sockets references a fixed socket.io, engine.io, socket.io-client and engine.io-client.

engine.io #322
socket.io #2056
engine.io-client#388
socket.io-client#838

@Karnith
Copy link
Contributor Author

Karnith commented Apr 30, 2015

@tjwebb has anyone tested sails on windows lately? I know you haven't cause you use linux/unix.

This issue will remain searchable, but the issue seems to be with a specific windows+node combination, not with sails.

unless full testing with various platforms is done, like in any other development methodology, what you stated above is incorrect. That is unless the sails team decide to publicly announce that windows is no longer supported. I'll delete the long posts, so this is easier to follow for you.

@randallmeeker
Copy link

This seems to have turned this into a generic Windows vs the rest of the world issue.

typical Windows nonsense

Their is a ton of development of Node.js on Windows. Also Windows Azure has invested a lot in to trying to be a premier Node.js platform for enterprise apps. I think its wrong to discount this issue simply because its Windows. (should be noted that I don't use Azure).

I have/had sails running on dev servers running Windows 7, 10 and Server 2008 with out issues. I'm on different versions, but I'm still under Node 12 on each of these platforms. I have not had a chance to test with 12.

@Karnith makes a good point that by closing this, were essentially saying that Windows is not supported. If sails does not want to burden of supporting windows that is their decision to make, but it should probably put that out the on the getting started page?

@randallmeeker
Copy link

+1 @tjwebb Wrangling open source projects is tough (especially as they get popular). I can say I appreciate all that you and the sails guys do!

@ogrotten
Copy link

I have come into the same problem here as @Karnith, but I'm not sure exactly what steps he took to fix it. Would someone be willing to spell it out?

Philosophically, this issue doesn't need a hard 'fix' so much as established instruction. If @Karnith has made a viable work around, listing a series of steps to take would likely be Good Enough for closing the issue.

[edit] to be clear:
I've not upgraded form 0.10, node installed without problem, i've installed Visual Studio Express and Windows SDK 2008, and I followed the windows instructions on then npm node-gyp page.

@Karnith
Copy link
Contributor Author

Karnith commented May 18, 2015

The work around I had was to fork the sails, sails socket.io client projects, socket.io, engine.io and their clients. I corrected all the references and then used my forks instead of sails repo

@ogrotten
Copy link

I understand forking the repos, but what clients? Then, corrected all of what references?

I generally don't have a problem with following instructions, but I don't know what you're talking about.

@Karnith
Copy link
Contributor Author

Karnith commented May 19, 2015

There is socket.io, socket.io-client, engine.io and engine.io-client used by sails in dependants. The whole socket.io dependencies need to be fixed to reference the correct versions. Then sails and sails socket module need to reference the updated forks. See my repositories for examples.

-------- Original message --------
From: ogrotten notifications@github.com
Date: 05/18/2015 21:14 (GMT-08:00)
To: balderdashy/sails sails@noreply.github.com
Cc: Matthew Marino mmarino@jcmar.com
Subject: Re: [sails] Sails install issue Windows 8.1 node 12 (#2884)

I understand forking the repos, but what clients? Then, corrected all of what references?

I generally don't have a problem with following instructions, but I don't know what you're talking about.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2884#issuecomment-103328121.

@Thelmos
Copy link

Thelmos commented May 20, 2015

Really nice job @Karnith, I'll give your repos a try, I'm stuck with this error and I see no chance of being solved soon in original repo.

It's a shame people do not realize the amount of Sails installations using windows out there.

Thanks.

@randallmeeker
Copy link

An Issue/PR needs to be brought up here https://github.com/balderdashy/sails-hook-sockets

@Karnith can you do a PR for that library since you already have it forked?

Once that library is updated then we can begin the work on merging it into the Sails repo.

Aging repos are a concern for everybody, not just us bad, bad, bad Windows users.

@gitjhn
Copy link

gitjhn commented May 30, 2015

Following the install instructions on the sailsjs.org website to install on windows (8):

  1. install node --> successfully installed node v0.12.4
  2. npm -g install sails --> long list of errors, does not install

Then I found this issue. Is there a timeline to get this fixed and updated to npm? Otherwise the sailsjs.org website should state that "currently Sails does not work on windows" or have a detailed list of the hoops to jump through.

@ogrotten
Copy link

ogrotten commented Jun 9, 2015

@gitjhn I'm not so sure this can be fixed internally. Sails is not the only node module that has these sorts of problems. I have found that anything that compiles is very similar.

It's also rather sticky in that it's not truly a module problem. If you can get it to compile, it will work on windows, and compiling, it could be argued, isn't necessarily the modules responsibility.

My "fix" was to drop windows from the dev env completely and use a linux vm with a samba share. Since I was using it for dev convenience (ide, etc) this has been 100%.

@miguelon85
Copy link

I have the same issue. did u have any update?

@Karnith
Copy link
Contributor Author

Karnith commented Jun 23, 2015

@randallmeeker I would do a PR, but when Automattic updates all the socket.io and engine.io dependencies, things would probably break again. I have received word that they are planning a fix, they just need to fix another issue introduced by a pr first.

@Karnith
Copy link
Contributor Author

Karnith commented Jul 13, 2015

There still hasn't been any push to npm, but the new fix to compile on windows is to reference the github packages (Automatic/socket.io, Automatic/socket.io-client, etc) in sails-hooks-sockets and sails package.json. They fixed it on github, just haven't pushed to npm.

@anweiss
Copy link

anweiss commented Jul 15, 2015

It looks like updates to socket.io and socket.io-client as of 1.3.6 have been pushed to npm. Any chance the appropriate changes can be made to these dependencies in both the sails and sails-hook-sockets to close out this issue?

@Karnith
Copy link
Contributor Author

Karnith commented Jul 15, 2015

This should be automatic since both are referencing npm. I just tested and everything compiles correctly now in windows.

@Karnith
Copy link
Contributor Author

Karnith commented Jul 15, 2015

Closing issue.

@Karnith Karnith closed this as completed Jul 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

10 participants