I have tried many ways to include a module installed by luarocks in a tex file to be processed by lualatex, but all methods give me
/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:381: attempt to call
a nil value (field 'cpath specification')
stack traceback:
...0/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:381: in field '?'
...0/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:403: in function <
...0/texmf-dist/tex/luatex/lualibs/lualibs-basic-merged.lua:395>
[C]: in function 'require'
[\directlua]:1: in main chunk.
I've tried Using LuaLaTeX and SQLite3 and the package luapackageloader. I have also played with setting package.path and package.cpath. The goal for me is to load the path module from penlight. And for that, I've tried both
\directlua{
require("pl")
path = require("pl.path")
}
and
\directlua{
path = require("path")
}
Everything gave the same error quoted below. What did I do wrong?
Thanks!
PS. I'm running everything on a clean Ubuntu Bionic installation.
axessibilitypackage. Fixed by putting fileaxessibility.luainto one of the folders returned bykpsewhich -show-path=lua, then runningtexhash(which was a crucial step I forgot to make). – Ilya V. Schurov Sep 08 '20 at 21:17