Giter VIP home page Giter VIP logo

Comments (10)

factotvm avatar factotvm commented on August 29, 2024 1

Wow, I have no idea...

❯ lua
Lua 5.4.3  Copyright (C) 1994-2021 Lua.org, PUC-Rio
> fennel = require("fennel")
stdin:1: module 'fennel' not found:
	no field package.preload['fennel']
	no file '/opt/homebrew/share/lua/5.4/fennel.lua'
	no file '/opt/homebrew/share/lua/5.4/fennel/init.lua'
	no file '/opt/homebrew/lib/lua/5.4/fennel.lua'
	no file '/opt/homebrew/lib/lua/5.4/fennel/init.lua'
	no file './fennel.lua'
	no file './fennel/init.lua'
	no file '/opt/homebrew/lib/lua/5.4/fennel.so'
	no file '/opt/homebrew/lib/lua/5.4/loadall.so'
	no file './fennel.so'
stack traceback:
	[C]: in function 'require'
	stdin:1: in main chunk
	[C]: in ?


❯ luarocks install fennel
Installing https://luarocks.org/fennel-1.0.0-1.src.rock

fennel 1.0.0-1 depends on lua >= 5.1 (5.4-1 provided by VM)
fennel 1.0.0-1 is now installed in /opt/homebrew (license: MIT)


❯ lua
Lua 5.4.3  Copyright (C) 1994-2021 Lua.org, PUC-Rio
> fennel = require("fennel")
>

So, I could have sworn I followed the install instructions. But, maybe I lost it on a brew reinstall. Installing fennel again has fixed it.

I was able to remove my path setting in init.lua and everything is working, so the Hammerspoon update appears to fix it. Thanks.

from spacehammer.

agzam avatar agzam commented on August 29, 2024

Please provide the version numbers.
It doesn't seem to be reproducible on:

Fennel 1.0.0 on Lua 5.4 and Hammerspoon 0.9.93 (6148)

from spacehammer.

factotvm avatar factotvm commented on August 29, 2024

I'm experiencing the same issue. I have it working on an old machine, but a new one won't load.

❯ fennel -v
Fennel 1.0.0 on Lua 5.4
❯ lua -v
Lua 5.4.3  Copyright (C) 1994-2021 Lua.org, PUC-Rio

Hammerspoon: Version 0.9.93 (6148)

This is on an M1 Mac with Homebrew (in /opt/homebrew/).

Error:

2022-01-21 09:13:29: *** ERROR: ...poon.app/Contents/Resources/extensions/hs/_coresetup.lua:662: module 'fennel' not found:

from spacehammer.

Grazfather avatar Grazfather commented on August 29, 2024

In the hammerspoon console print out package.path. Can fennel be found in there? I actually reported a bug about this thing Hammerspoon/hammerspoon#3081 which was fixed.

Basically hammerspoon doesn't know to look in /opt/homebrew until the above fix is released you can either explicitly set the LUA_PATH or add fennel to /usr/local/lib/lua/5.4/

from spacehammer.

factotvm avatar factotvm commented on August 29, 2024

I tried the new Hammerspoon version, and it didn't work. I also updated init.lua to several different incantations that look something similar to:

package.path = package.path .. ";" .. "/opt/homebrew/Cellar/lua/5.4.3_1/?.lua;"

I know nothing about Lua or Fennel, sorry... I'm trying to look at the lines below for a hint.

(I forgot to mention I also tried LUA_PATH... could be PEBKAC.)

from spacehammer.

Grazfather avatar Grazfather commented on August 29, 2024

did you use the version linked in the ticket, or the release? I am at work and cannot check my package.page at the moment, but shouldn't your path contain your luarocks dir?

from spacehammer.

factotvm avatar factotvm commented on August 29, 2024

The pre-release version he linked to in the ticket.

from spacehammer.

factotvm avatar factotvm commented on August 29, 2024

Hammerspoon: Version 0.9.93 (6172)

from spacehammer.

factotvm avatar factotvm commented on August 29, 2024

Here is package.path

/Users/me/.hammerspoon/?.lua;/Users/me/.hammerspoon/?/init.lua;/Users/me/.hammerspoon/Spoons/?.spoon/init.lua;/opt/homebrew/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?/init.lua;/opt/homebrew/lib/lua/5.4/?.lua;/opt/homebrew/lib/lua/5.4/?/init.lua;/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/Applications/Hammerspoon.app/Contents/Resources/extensions/?.lua;/Applications/Hammerspoon.app/Contents/Resources/extensions/?/init.lua;/opt/homebrew/Cellar/lua/5.4.3_1/?.lua;;/Users/me/.luarocks/share/lua/5.4/?.lua;/Users/me/.luarocks/share/lua/5.4/?/init.lua;/Users/me/.luarocks/share/lua/5.3/?.lua;/Users/me/.luarocks/share/lua/5.3/?/init.lua

You can see both... (mine is the Cellar one). Have I don't something else? On the command line, everything seems fine.

from spacehammer.

Grazfather avatar Grazfather commented on August 29, 2024

Happy to hear!

from spacehammer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.