Skip to content

ERROR: module 'stackline.stackline.core' not found: #12

Closed

Description

@johnallen3d

Thanks for this project, love the concept!

I'm giving it a try, and I am getting the following error when launching Hammerspoon.

2020-08-03 10:07:53: Welcome to the Hammerspoon Console!
You can run any Lua code in here.

2020-08-03 10:07:53: -- Lazy extension loading enabled
2020-08-03 10:07:53: -- Loading ~/.hammerspoon/init.lua
2020-08-03 10:07:53: *** ERROR: ...app/Contents/Resources/extensions/hs/_coresetup/init.lua:597: module 'stackline.stackline.core' not found:
	no field package.preload['stackline.stackline.core']
	no file '/Users/johna/.hammerspoon/stackline/stackline/core.lua'
	no file '/Users/johna/.hammerspoon/stackline/stackline/core/init.lua'
	no file '/Users/johna/.hammerspoon/Spoons/stackline/stackline/core.spoon/init.lua'
	no file '/usr/local/share/lua/5.3/stackline/stackline/core.lua'
	no file '/usr/local/share/lua/5.3/stackline/stackline/core/init.lua'
	no file '/usr/local/lib/lua/5.3/stackline/stackline/core.lua'
	no file '/usr/local/lib/lua/5.3/stackline/stackline/core/init.lua'
	no file './stackline/stackline/core.lua'
	no file './stackline/stackline/core/init.lua'
	no file '/Applications/Hammerspoon.app/Contents/Resources/extensions/stackline/stackline/core.lua'
	no file '/Applications/Hammerspoon.app/Contents/Resources/extensions/stackline/stackline/core/init.lua'
	no file '/Users/johna/.hammerspoon/stackline/stackline/core.so'
	no file '/usr/local/lib/lua/5.3/stackline/stackline/core.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './stackline/stackline/core.so'
	no file '/Applications/Hammerspoon.app/Contents/Resources/extensions/stackline/stackline/core.so'
	no file '/Users/johna/.hammerspoon/stackline.so'
	no file '/usr/local/lib/lua/5.3/stackline.so'
	no file '/usr/local/lib/lua/5.3/loadall.so'
	no file './stackline.so'
	no file '/Applications/Hammerspoon.app/Contents/Resources/extensions/stackline.so'
stack traceback:
	[C]: in function 'rawrequire'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:597: in function 'require'
	/Users/johna/.hammerspoon/init.lua:1: in main chunk
	[C]: in function 'xpcall'
	...app/Contents/Resources/extensions/hs/_coresetup/init.lua:648: in function 'hs._coresetup.setup'
	(...tail calls...)

The only thing that I did differently when getting setup was not cloning to my ~/Downloads directory and dealing with relative paths (native MacOS version of ln does not support the -r flag). I cloned to ~/.hammerspoon/src/ instead, so my ~/.hammerspoon directory looks like this.

~/.hammerspoon
❯ exa -hla --git
Permissions Size User  Date Modified Name
lrwxr-xr-x    18 johna  3 Aug 10:07  bin -> src/stackline/bin
.rw-r--r--    35 johna  3 Aug  8:49  init.lua
drwxr-xr-x     - johna  3 Aug  8:46  Spoons
drwxr-xr-x     - johna  3 Aug  8:49  src
lrwxr-xr-x    24 johna  3 Aug 10:07  stackline -> src/stackline/stackline
lrwxr-xr-x    20 johna  3 Aug 10:07  utils -> src/stackline/utils

and my init.lua

~/.hammerspoon
❯ cat init.lua
require "stackline.stackline.core"

Probably something simple I'm missing. I am not (was not) a Hammerspoon user nor do I have Lua experience.

Activity

  1. alin23 commented on Aug 3, 2020

    @alin23
    Contributor

    @johnallen3d you can do this to make it work:

    1. cd ~/hammerspoon && rm -r bin src stackline utils
    2. git clone https://github.com/AdamWagner/stackline ~/hammerspoon/stackline
  2. johnallen3d commented on Aug 3, 2020

    @johnallen3d
    Author

    OJ, just so I'm clear, the folder structure should look something like this? If I do this then I no longer see an error launching Hammerspoon (yah!) but I'm not seeing the "pills" when I introduce a stack. 🤔

    ❯ exa --tree
    .
    ├── init.lua
    ├── Spoons
    ├── stackline
    │  ├── bin
    │  │  └── yabai-get-stacks
    │  ├── stackline
    │  │  ├── core.lua
    │  │  ├── stack.lua
    │  │  └── window.lua
    │  └── utils
    │     ├── flatten.lua
    │     ├── table-utils.lua
    │     ├── underscore.lua
    │     └── utils.lua
    
  3. alin23 commented on Aug 3, 2020

    @alin23
    Contributor

    The shell also defaults to /usr/local/bin/dash in this which must be installed using brew install dash

  4. alin23 commented on Aug 3, 2020

    @alin23
    Contributor

    I've fixed most of this stuff here: #13

    But @AdamWagner is already in the middle of a big refactor to ditch the shell script so this might get more stable in the next few days.

  5. johnallen3d commented on Aug 3, 2020

    @johnallen3d
    Author

    ah ha! Installing dash got me there!
    incent-gem — fish 2020-08-03 12-51-08

    I'm following the project and will plan to upgrade whn @AdamWagner's PR is merged.

    Thanks for your help!

  6. AdamWagner commented on Aug 4, 2020

    @AdamWagner
    Owner

    Sorry for the bumpy start @johnallen3d ! I'll update the readme with the tips shared here!

  7. pinned this issue on Aug 4, 2020
  8. added a commit that references this issue on Aug 4, 2020
  9. johnallen3d commented on Aug 4, 2020

    @johnallen3d
    Author

    Thanks for getting those updated steps out there @AdamWagner and for your help troubleshooting @alin23! I'm looking over the README and trying the latest and two things stand-out.

    It looks like the . in .hammerspoon is missing here:

    git clone https://github.com/AdamWagner/stackline.git ~/hammerspoon/stackline
    

    I don't have a /usr/local/bin/hs. I'm guessing that relates to Hammerspoon? I don't have an hs on my path at all (which hs returns nothing).

    Happy to open PR's or help in other ways (continue to be a tester) if I can!

  10. johnallen3d commented on Aug 4, 2020

    @johnallen3d
    Author

    OK, I just did > hs.ipc.cliInstall() from the Hammerspoon Console...

    ❯ which hs
    /usr/local/bin/hs

    🎉

  11. alin23 commented on Aug 4, 2020

    @alin23
    Contributor

    OK, I just did > hs.ipc.cliInstall() from the Hammerspoon Console...

    ❯ which hs
    /usr/local/bin/hs

    🎉

    oh right.. forgot about that. I have that line in my init.lua file, we'll have to add this inside the readme

  12. AdamWagner commented on Aug 5, 2020

    @AdamWagner
    Owner

    Good catches, @johnallen3d! I fixed the missing "dot" in the hammerspoon path, added instructions for installing hs, and added a shout-out to @johnallen3d for identifying these issues & being willing to push though them 👏

  13. unpinned this issue on Aug 22, 2020
  14. added
    bug
    documentation
    on Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdocumentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions