Open Hades32 opened 9 years ago
Your project is too deep in directories for the spawn. I remember running onto it back in a day. I'll check out if there's any way to fix it
As this is still Happening with Atom 1.0.0 I debugged a little bit. The ENAMETOLONG is a wrong error code. I truth there is a bug in Node.js where child_process.spawn somehow NULLs an object which leads to an unexpected crash when the command gives some unexpected exit code.
What autocomplete-elixir is doing is this call on Windows:
{ "file" : "C:\Windows\system32\cmd.exe", "args" : ["C:\Windows\system32\cmd.exe", "/s", "/c", "\"elixir\elixir \"C:\Users\marti.atom\packages\autocomplete-elixir\lib\alchemide\autocompleter\autocomplete.exs\" \"D:\Projekte\2048squared\"\""], "windowsVerbatimArguments" : true, "detached" : false, "envPairs" : ["ALLUSERSPROFILE=C:\ProgramData", "APPDATA=C:\Users\marti\AppData\Roaming", "ATOM_HOME=C:\Users\marti.atom", "CommonProgramFiles=C:\Program Files (x86)\Common Files", "CommonProgramFiles(x86)=C:\Program Files (x86)\Common Files", "CommonProgramW6432=C:\Program Files\Common Files", "COMPUTERNAME=WIN-SJ0A7GO32DV", "ComSpec=C:\Windows\system32\cmd.exe", "FPS_BROWSER_APP_PROFILE_STRING=Internet Explorer", "FPS_BROWSER_USER_PROFILE_STRING=Default", "GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q", "HOMEDRIVE=C:", "HOMEPATH=\Users\marti", "LOCALAPPDATA=C:\Users\marti\AppData\Local", "LOGONSERVER=\MicrosoftAccount", "NODE_ENV=production", "NODE_PATH=C:\Users\marti\AppData\Local\atom\app-1.0.0\resources\app.asar\exports", "NUMBER_OF_PROCESSORS=4", "OS=Windows_NT", "Path=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\erl6.4\bin;C:\Program Files (x86)\Elixir\bin;C:\Program Files\Git\cmd;C:\OtherProgs\Vagrant\bin;C:\Users\marti\AppData\Local\atom\bin;C:\Program Files\Boot2Docker for Windows", "PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC", "PROCESSOR_ARCHITECTURE=x86", "PROCESSOR_ARCHITEW6432=AMD64", "PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 58 Stepping 9, GenuineIntel", "PROCESSOR_LEVEL=6", "PROCESSOR_REVISION=3a09", "ProgramData=C:\ProgramData", "ProgramFiles=C:\Program Files (x86)", "ProgramFiles(x86)=C:\Program Files (x86)", "ProgramW6432=C:\Program Files", "PSModulePath=C:\Windows\system32\WindowsPowerShell\v1.0\Modules\", "PUBLIC=C:\Users\Public", "SESSIONNAME=Console", "SystemDrive=C:", "SystemRoot=C:\Windows", "TEMP=C:\Users\marti\AppData\Local\Temp", "TMP=C:\Users\marti\AppData\Local\Temp", "USERDOMAIN=WIN-SJ0A7GO32DV", "USERDOMAIN_ROAMINGPROFILE=WIN-SJ0A7GO32DV", "USERNAME=marti", "USERPROFILE=C:\Users\marti", "VBOX_INSTALL_PATH=C:\Program Files\Oracle\VirtualBox\", "windir=C:\Windows"], "stdio" : [{ "type" : "pipe", "readable" : true, "writable" : false, "handle" : { "fd" : -1, "writeQueueSize" : 0 } }, { "type" : "pipe", "readable" : false, "writable" : true, "handle" : { "fd" : -1, "writeQueueSize" : 0 } }, { "type" : "pipe", "readable" : false, "writable" : true, "handle" : { "fd" : -1, "writeQueueSize" : 0 } } ] }
You notice the "elixir\elixir" part? As it looked wrong I replaced it with "elixir" in the debug, and voila it works!
I hope this helps fixing this issue...
Oh I know what's the problem. I gave default value for "elixirPath" equal to "elixir". Which is dumb because it's used to be a folder so it adds up to "elixir/elixir". In newest version I changed it to always remove word elixir from the setting so it will work either when path provided or when folder provided. Try it our with the newest version v1.3.7 if i remember well
1.3.8*
[Enter steps to reproduce below:]
Atom Version: 0.201.0 System: C415M5CB3410TQN Thrown From: autocomplete-elixir package, v1.2.6
Stack Trace
Uncaught Error: spawn ENAMETOOLONG
Commands
Config
Installed Packages