halohalospecial / atom-elmjutsu

A bag of tricks for developing with Elm. (Atom package)
https://atom.io/packages/elmjutsu
MIT License
192 stars 24 forks source link

Failed to load with "Failed to require the main module of 'elmjutsu'" in console. #79

Closed DavidLGoldberg closed 6 years ago

DavidLGoldberg commented 7 years ago

In console I see:

Failed to require the main module of 'elmjutsu' because it requires one or more incompatible native modules (binding, binding, binding, binding, binding). Run apm rebuild in the package directory and restart Atom to resolve.

Image for clarity below:

image

I did try to run the command. No change. :(

I'm familiar with Atom package dev (although never seen this one per se), so if you need me to do more investigation let me know...

halohalospecial commented 7 years ago

@DavidLGoldberg Hmm, this is also the first time I've seen that. Can you try reinstalling elmjutsu first? Thanks!

ianp commented 7 years ago

I'm seeing the same issue (Atom 1.19.0-beta1). Running app rebuild makes no difference, neither does uninstall and reinstalling elmjutsu.

I'm not familiar with Atom package dev, but am happy to spend some time trying things at your suggestion.

ianp commented 7 years ago

Looks like the problem is with fsevents, see:

screen shot 2017-06-26 at 19 14 01

I've also tried

$ cd ~/.atom/packages/elmjutsu
$ rm -r node_modules
$ node install
$ api rebuild

But it didn't change anything. I've also tried with both the --update-binary and --build-from-source options to npm.

I'm running OS X 10.12.5 if that helps at all.

DavidLGoldberg commented 7 years ago

I tried my normal few things, uninstall etc. No luck, just tried again, same.

what versions do you get when you do: nvm current

node -v

I vaguely remember the shell you're on when you install affects it.

DavidLGoldberg commented 7 years ago

Ah, so I followed the instructions from this post and it worked!

https://github.com/jas-chen/atom-live-server/issues/57

That is cmd + shift + p : incompatible packages: View

DavidLGoldberg commented 7 years ago

(Amazing package btw)

Quick question: Any thoughts of doing something like elm-navigator package did and write some of this package in elm? I'm trying to learn elm / put it in my packages at some point.

BTW, still not 100% clear to me what causes the packages to get into the state that made me create the issue. Other packages seem to have the same issue with fsevents. I am not sure if there is anything you can do differently. You use the regular apm publish during release etc right? Might want to close the issue...

ianp commented 7 years ago

Updating to the latest version, then rebuilding from the incompatible packages view seems to have fixed it: many thanks!

halohalospecial commented 7 years ago

Hi! Sorry, I was not able to help much. Maybe it has something to do with fsevents in Mac (I'm using Lubuntu). elmjutsu and linter-elm-make depends on chokidar, which uses fsevents. atom-live-server depends on live-server, which depends on chokidar.

About your quick question @DavidLGoldberg, the core parts of this package were written in Elm (https://github.com/halohalospecial/atom-elmjutsu/tree/master/elm). (Code is kinda messy though :))

halohalospecial commented 7 years ago

Hi again! I've recently updated Atom (I didn't realize that I was not using the latest version) and noticed the red bug icon like in your screenshot. When I clicked that icon, the Incompatible Packages tab appeared and I was able to resolve the issue by clicking the Rebuild Packages button.

DavidLGoldberg commented 7 years ago

Yeah, I've had to do it more than once though, let's keep an eye on it... It's probably not your fault really unfortunately :\

DavidLGoldberg commented 7 years ago

Thanks for the link to the code, I guess I didn't spend enough time with the source :)

DavidLGoldberg commented 7 years ago

Damn, you're a super hero.... This will be my new goto.....I'll have to get it set up and see if I can hack at it before moving on to porting Jumpy :) The other one I looked at had a build step....I'll be curious to see how you handled that, I'll probably ping you with some questions in a week or so :)

halohalospecial commented 7 years ago

Awesome work on the Jumpy package! If you're on Elm Slack, you can also ping me there :smile:

halohalospecial commented 6 years ago

The dependencies were updated a few versions ago. Feel free to reopen the issue if you encounter it again :smile: