Help w/LUA


#1

I’m a noob. Worse than that, I’m an old noob. All I really want is a plugin for Lightroom that no one’s bothered to make. So… I understand such plugins are written in a version of LUA 5.1.4 (a previous version) and I’d like to know I’ve set up the text editor properly. Adobe has an SDK manual that’s I’ve downloaded and noodled around with instructions, but as one might bet, things didn’t work out. I installed some kind of checker but it gives me messages I don’t understand.

Error: spawn luacheck ENOENT
Error: spawn luacheck ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

Help. :dizzy_face:


#2

We can’t help you unless we know what the specific package is.


#3

It’s not necessarily the error messages but whether or not I’m running the correct version of LUA. In any case, here’s the package I installed and then disabled.

Install luacheck.


#4

There’s not a luacheck package that I can find, but there’s a linter-luacheck. It uses an external application called luacheck, and from the error it sounds like the linter package is unable to find luacheck. ENOENT is short for “error: no entry”, which means that it’s looking for a file or directory that doesn’t exist. So:

  1. Is luacheck installed on your system?
  2. If so, does the linter-luacheck config point at luacheck?

#5

Yes, the package is actually called linter -luacheck. I don’t know the significance of linter.

I get error:

Plug-in error log for plug-in at: /Volumes/SF_UserData/Users/smallfavor/PROJECTS/CODING/LUA/helloworld.lrdevplugin

**** Error 1

An error occurred while attempting to load this plug-in.
Info.lua:5: ‘’ expected near ‘LrExportMenuItems’


I’m trying to work through the first excercise in the adobe SDK manual for LR


#6

Like I said, we need to know the specific package involved. linter is a package that scans code for syntax errors, and linter-luacheck is a bridge between linter and luacheck.

That error message does not seem like it’s connected to Atom or linter-luacheck. Please answer the two questions I asked previously.


#7

Here’s a screen and a vid to show you what happens.


#8

If you don’t answer the two questions I asked, I can’t help you.


#9

Is luacheck installed on your system?

I don’t know for sure. It doesn’t come up in a search separately but only with the lint attached.

If so, does the linter-luacheck config point at luacheck?

I don’t know. But thanks anyway for you help


#10

If you haven’t installed luacheck, that’s what you should start. Then you can add it to the configuration for linter-luacheck.


#11

Luacheck is installed. Linter-luacheck is installed. So too is Luajit as per some advice given on github. Now even with the linter-luacheck turned off I’m getting large error messages like before.

Error: spawn luac ENOENT
at exports._errnoException (util.js:1026:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

I’ve no idea whether or not linter-luacheck is pointing in the correct direction.


#12

The way to tell is to open the location in Explorer and see if a luacheck.bat file is there.


#13

I don’t understand your instructions. You assume I know more than I do. I’m not sure why since I declared how much of a noob I was. I don’t know what location you’re talking about. I don’t have explorer if you mean a web browser. I open the item in Chrome but I’ve no idea where to find the bit you mentioned - a lot of code shows up in the developer window.

If you want to help me, thank you, but you’ll have to provide more information and don’t assume I’ll simply know what or where you’re referring to.


#14

Ok. Based on your command output it looks like you’re on macOS. Please correct me if I’m wrong.

Can you please open Terminal and type in apm list --installed, and then paste the output here?

You can check if luacheck is installed by typing which luacheck. It also looks like a different package is trying to spawn the luac command, so also try which luac.


#15

Kewl! (Yes I’m running OS 10.12 …)

I’m using the Atom editor 1.13.1. trying to write the ‘hello world’ bit in the first part of a tutorial manual put out my adobe.

Terminal -

Here’s what comes up after “amp list —installed”

-bash: apm: command not found

“Luacheck" returns nothing:

smallfavor$ luacheck
smallfavor$

"Which luacheck” all returns nothing:

smallfavor$ which luacheck
smallfavor$

“Install linter linger Lua ” entered yesterday
Also returns this:

smallfavor$ install linter linter-lua
smallfavor$ -bash: apm: command not found

Hope that helps!

The arrows point to the two packages I had to disable to stop the error messages showing up every time a file was clicked on in the editor.

Government is a broker in pillage, and every election is a sort of advance auction in stolen goods.

H. L. Mencken


#16

Sorry, I don’t know where I got the impression that you might be on Windows. Explorer is the name for the file manager on Windows, like Finder. In any case, I don’t believe that going to a specific path in your file directory is a high-level task.

This means that you probably don’t have luacheck installed and you should start there.


#17

Sob

I’m getting f’ing disgusted at this point. It shouldn’t be this much of a f’ing hassle.

I need an earlier version of Lua so to install it I used the code given and changed the version number but I missed changing it completely so now I don’t know if I’ve the older version installed in a directory with the newer version name, of vice versa or fuck all.

curl -R -O http://www.lua.org/ftp/lua-5.3.4.tar.gz
tar zxf lua-5.1.4.tar.gz
cd lua-5.3.4
make macosx test

It’s been some hours now and I’m sick of the whole fucking endeavor


#18

To check your version of Lua, you can use the command line interface by opening Terminal and entering lua -v. If that’s not the version you need, then you can install a new one using the same process.