rhysd / NyaoVim

Web-enhanced Extensible Neovim Frontend
Other
2.22k stars 57 forks source link

Cannot run nyaovim #32

Closed flyingfisch closed 8 years ago

flyingfisch commented 8 years ago

I tried to run nyaovim and am getting this error. I'm on Ubuntu 14.04.

$ nyaovim 
fs.js:584
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/usr/lib/node_modules/nyaovim/node_modules/electron-prebuilt/path.txt'
    at Error (native)
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.readFileSync (fs.js:431:33)
    at Object.<anonymous> (/usr/lib/node_modules/nyaovim/node_modules/electron-prebuilt/index.js:4:42)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)
    at require (internal/module.js:16:19)
rhysd commented 8 years ago

How did you install nyaovim? And please tell me Node.js version.

flyingfisch commented 8 years ago

This was the way I installed nyaovim:

$ sudo npm install -g nyaovim

And this is my node version:

$ node -v
v5.6.0
rhysd commented 8 years ago

OK, I'll check on Ubuntu on VirtualBox.

It may not be good to install node modules to /usr/lib because of permission. Could you check $ sudo nyaovim?

flyingfisch commented 8 years ago

sudo nyaovim gives me the same problem.

rhysd commented 8 years ago

Hmm...

This problem looks derived from 'electron-prebuilt' package. It creates path.txt file to its directory to notify the place of electron. Is there path.txt in /usr/lib/node_modules/nyaovim/node_modules/electron-prebuilt?

rhysd commented 8 years ago

In my environment (Ubuntu 14.04), installing locally and globally (/usr/local) didn't occur this problem.

flyingfisch commented 8 years ago

This is what I have:

mark@mark-ThinkPad-X1-Carbon-3rd:/usr/lib/node_modules/nyaovim/node_modules/electron-prebuilt$ ls
cli.js  CONTRIBUTING.md  electron-tmp-download-26649-1456445817894  index.js  install.js  LICENSE  package.json  README.md  test
rhysd commented 8 years ago

electron-tmp-download-26649-1456445817894

Ah, it looks to fail to download Electron binary. Could you install nyaovim again?

flyingfisch commented 8 years ago

That fixed it, thanks!

hayd commented 8 years ago

I see this problem with node 6.3.0 on OSX.

First I had to install electron (initially there was no electron-prebuilt directory), npm install -g electron, but still there is no path.txt.

$ ls /usr/local/lib/node_modules/nyaovim/node_modules/electron-prebuilt
CONTRIBUTING.md   LICENSE           README.md         cli.js            index.js          install.js        issue_template.md package.json      test

EDIT: Fixed by nuking all my npm modules and starting afresh.