mysamai / mysam

An open "intelligent" assistant for the web that can listen to you and learn.
https://mysamai.com
GNU General Public License v3.0
621 stars 65 forks source link

install with -g is a no-go in windows #8

Open shenanigans opened 8 years ago

shenanigans commented 8 years ago

Installing with -g in windows adds substantial bytes to the front of the pathname and risks exceeding the pathname length restriction in Windows. This is sometimes ok for Node.js apps but attempting to build a native module beyond the length limit is a problem. By the time you get into feathers' socket.io's engine.io's unicode parser your jumbo paths will get rejected by Visual Studio.

I was able to run mysam just fine by installing it locally to a short path. Specifically I was at c:\code\sam\. My recommended fix is to just update the installation instructions to warn windows users of the issue and workaround.

daffl commented 8 years ago

I'm wondering if we can make sure that it doesn't need to compile anything (e.g. since Sam only supports modern browsers use Primus plain websockets). From what I understand the path length isn't an issue then. Also, glad that it works on Windows besides that, I have to admit I didn't test it yet :) If you could make pull request with a note about Windows installation that would be much appreciated.

Thank you

CKarper commented 8 years ago

npm3 should really make this problem less pressing. Since it installs dependencies as flat as possible, it keeps paths shorter.

derhuerst commented 8 years ago

Global install is often not necessary. Installing locally and running via ./node_modules/.bin/whatever works fine.