Kylart / KawAnime

Desktop app for anime fans
MIT License
671 stars 50 forks source link

Npm run start fails. #44

Closed leotaku closed 6 years ago

leotaku commented 6 years ago

When following the README instructions on installing and running KawAnime, I get the following error in response to running npm run start:

> KawAnime@0.2.5 start /home/leo/NodeTesting/KawAnime
> cross-env NODE_ENV=production electron main.js

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: spawn /home/leo/NodeTesting/KawAnime/node_modules/electron/dist/electron ENOENT
    at _errnoException (util.js:992:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
    at onErrorNT (internal/child_process.js:372:16)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:695:11)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! KawAnime@0.2.5 start: `cross-env NODE_ENV=production electron main.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the KawAnime@0.2.5 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/leo/.npm/_logs/2018-07-11T15_16_52_593Z-debug.log

This happens both on the master and 0.2.5 release branch. I don't really know anything about node.js and friends, so I'm sorry in case I have missed something obvious.

Kylart commented 6 years ago

So you have to install the packages before: https://github.com/Kylart/KawAnime#installation Then you have to build the app: https://github.com/Kylart/KawAnime#start

leotaku commented 6 years ago

I ran npm install as well as npm run build before npm run start.

Kylart commented 6 years ago

So it would seem that your installation was incomplete for some reason. What is your Os ? Node and nom version ?

Does npm run dev work? Should not but

leotaku commented 6 years ago

My os is NixOS, it deviates from the FHS, so that could very well be the problem. (However Node apps have never failed building for me for that reason) I would use the appropriate Nix buildtools, but the buttercup library seems to call stuff in an nonstandard, unsupported way (not your fault, I know). I tried building both with node v10.5.0+ npm 6.1.0 and v8.11.3 + 5.6.0.

leotaku commented 6 years ago

As this likely isn't a problem you can fix. (related to my specific system, etc.) it should probably be closed. Still, thanks for the help and sorry for bothering you!

Kylart commented 6 years ago

From the error message, electron seems to be the problem.

Can you try to run this app (it's for investigation purposes). Whether it works or not, you cqn delete it right afterwards.

The next thing you can try is to update the electron version, simply run npm install electron@2.

leotaku commented 6 years ago

I have been able to fix the problem! I had to use the os-provided electron version, as it installs/links all the required dependencies. Is strange UI scaling a known problem with KawAnime, or should that be related to my (now outdated) electron version?

leotaku commented 6 years ago

Reference: maim-2018-07-11-21 08 55

Kylart commented 6 years ago

Glad to hear1

That is due to NPM doing black magic without me even asking for it. Basically it installer the latest version of vuetifyjs for no reason.

Installing version 1.0 should fix the problem: npm install vuetify@1.0. Ofc, rebuild after.

DeltaEvo commented 6 years ago

@LeOtaku i'm also using NixOS and yeah for all electron apps you need to either patch the electron binary downloaded in the node_modules or use the electron version packaged in nixpkgs

But I don't have this strange scalling issue, what version of electron are you using ?

DeltaEvo commented 6 years ago

Nevermind i had vuetify 1.0, @Kylart I think you should pin the version of vuetify https://github.com/Kylart/KawAnime/blob/master/package.json#L61 "vuetify": "1.0.17", :smile:

Kylart commented 6 years ago

Well, from my end, it seems really pinned and it seems that version 1.0.17 does exist so I don't know why npm installs v1.1 😢

Kylart commented 6 years ago

Seems like a fixed problem? Feel free to reopen if needed.