Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Failure to run with: Error: spawn flow ENOENT #134

Closed
samsch opened this issue Aug 31, 2016 · 7 comments
Closed

Failure to run with: Error: spawn flow ENOENT #134

samsch opened this issue Aug 31, 2016 · 7 comments

Comments

@samsch
Copy link

samsch commented Aug 31, 2016

Flow is installed (0.31.1) and works on the command line (server starts, and flow prints out flow errors).

If I trigger the linter with the default flow path, I get:
Error: spawn flow ENOENT

This is the error in the Atom console.
Uncaught Error: write EPIPE

If I set the flow path to my result for which flow (/home/sams/n/bin/flow), then I get a different error:
Error: /usr/bin/env: ‘node’: No such file or directory
The console shows the same as above.

  • Atom v1.9.8
  • linter-flow v5.5.0
  • linter v1.11.16

atom-ternjs and ide-flow are installed, but don't change the result enabled/disabled.

@Arcanemagus
Copy link
Member

The first error I've seen when testing, but was unable to figure out a fix for. The second error is interesting as the exact same issue happens on Windows with older atom-linter versions... but that was due to some odd escaping of the command it was doing before running it. I'm not sure how a *NIX based OS would be hitting that...

@samsch
Copy link
Author

samsch commented Sep 2, 2016

Erm, I just realized I did forget the specific OS in the report. I'm running Xubuntu 16.04.

Yesterday I ended up installing Nuclide, and upon having an issue with flow there as well, I dropped n in favour of nvm. I'm suspicious that n creates some weirdness with paths and global npm package executables, as I was able to get flow working with Nuclide for a while yesterday (it's back to not working today, with a similar write EPIPE error in the console).

@DanielHoffmann
Copy link

I am having the same problem in Linux Mint 18 (which is based on Ubuntu 16.04 LTS) Atom 1.9.8

@arvigeus
Copy link

npm install --save-dev flow-bin
And then set executable path in plugin's settings to
./node_modules/.bin/flow
(unix)

@samsch
Copy link
Author

samsch commented Sep 23, 2016

I have managed to get this, ide-flow, and Nuclide's flow stuff working at different times, using things like @arvigeus suggestion, as well as between installing/uninstalling plugins and such. I'm feeling a bit defeated by the last attempt though.

Nuclide doesn't support Atom 1.9, and several things were broken, so I uninstalled that, and I update to the latest version of Node. After that, ide-flow (or maybe flow-ide, it's hard to keep them straight) and linter-flow both worked properly using the globally install flow and the default (flow) paths. Then they all completely broke the next day after rebooting, and I have been unable to get any of them to work at all since. (With errors such as above, or flow path errors, etc; depending on what path settings, etc, that I'm trying.)

At this point I doubt that the problem is immediately local to any of the individual plugins, and more related to flow itself (which is still happily working from the command line), or surface flow exposes.

@nmn
Copy link
Contributor

nmn commented Sep 24, 2016

@samsch You're on Xubuntu so I'm not totally sure, but something similar happened on OS X a while ago. The problem was that when Atom started up it did not have the $PATH configured correctly. So it couldn't find flow or node. Setting the absolute path to $ which flow will only solve half the problem.

The workaround, at least on OS X, was to always open Atom from the terminal. Try quitting Atom, and opening it again directly from the terminal and see if that fixes the problem. If it does, it's a bug in Atom itself. Otherwise, we will continue to investigate what's going on.

@samsch
Copy link
Author

samsch commented Sep 26, 2016

@nmn Huh, that does indeed work. I hadn't paid attention to opening Atom via the app launcher vs the command line, and I tend to do both depending on what I'm working on.

So yeah, I tested both, and using the app launcher I get the above errors with linter-flow (as well similar stuff from ide-flow), and flow checking fails. When I start Atom from the command line, linter-flow and ide-flow work just fine.

Thanks for the tip! It looks like there was an Atom issue which is now closed. I haven't updated to Atom 1.10 yet, perhaps this is fixed there.

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

No branches or pull requests

5 participants