rhysd / NyaoVim

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

yarn global add nyaovim not work #136

Open gu-fan opened 6 years ago

gu-fan commented 6 years ago

Use yarn global add nyaovim Run with nyaovim

console error produces

$USER/AppData/Local/Yarn/config/global/node_modules/nyaovim/node_modules/neovim-component/neovim-editor.html
 Failed to load resource: net::ERR_FILE_NOT_FOUND

thus only npm install -g nyaovim can be used.

amireldor commented 6 years ago

Not sure if similar, but I had to npm i or yarn inside ./node_modules/nyaovim. This made things work. I've done the following steps both with npm and yarn:

mkdir nyaovim
cd nyaovim
yarn add nyaovim
npx nyaovim     <-- oops! not working
cd node_modules/nyaovim
yarn
cd ../..
npx nyaovim     --> yap, works!

I'm not familiar with npm packaging but maybe there's some flag missing doing this same thing?

jimpsson commented 6 years ago

I'm using Yarn also and had exactly the same type of problems launching Nyaovim. At first I thought it had to do with the fact that I was executing Nyaovim from Zsh and that it possibly did not reattach to user namespace like it is described in the FAQ, it seemed like a likely scenario.

Then after some debugging I was able to locate the problem, here is a short shell snippet to assert wether you have same problems as me: ls "$(yarn global dir)/node_modules/nyaovim/node_modules" | wc -l If the command results with 0 (lines), then Nyaovim was not installed fully, meaning its dependencies like electron and such is non existent within Nyaovim own node_modules directory. Try resolve it by following command: cd "$(yarn global dir)/node_modules/nyaovim" && yarn install

Hope it helps!