-1

I'm having a lot of problems with ZeroBraneStudio!

I enjoyed using it to write my first application on Windows, but now I fail to make it working on MacBook Air and even on WIndows after reinstalling Solar2D and ZeroBrane!

If I launch my app opening Corona Simulator everythings works well, but ZeroBrane doesn't work. The errors on MacBook and on Windows are similar.

On MacBook:

Program starting as '"/Applications/Corona-3664/Native/Corona/mac/bin/lua" -e "io.stdout:setvbuf('no')" "/var/folders/4w/hn6pxl5s20v31f0q2n9msjs40000gn/T/.bO0D1R"'.
Program 'lua' started in '/Applications/Corona-3664' (pid: 1638).
Debugging session started in '/Applications/Corona-3664/'.
SampleCode/Interface/Composer/main.lua:18: module 'composer' not found:
   no field package.preload['composer']
   no file './composer.lua'
   no file '/usr/local/share/lua/5.1/composer.lua'
   no file '/usr/local/share/lua/5.1/composer/init.lua'
   no file '/usr/local/lib/lua/5.1/composer.lua'
   no file '/usr/local/lib/lua/5.1/composer/init.lua'
   no file './composer.lua'
   no file './composer/init.lua'
   no file './lua/composer.lua'
   no file './lua/composer/init.lua'
   no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/composer.lua'
   no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer.lua'
   no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/composer/init.lua'
   no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/lualibs/composer/init.lua'
  no file './composer.so'
  no file '/usr/local/lib/lua/5.1/composer.so'
  no file '/usr/local/lib/lua/5.1/loadall.so'
  no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/composer.dylib'
  no file '/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/clibs/libcomposer.dylib'
  stack traceback:
 [C]: in function 'require'
 SampleCode/Interface/Composer/main.lua:18: in ma etc.

Please help me to understand what is going wrong! Thanks

Paul Kulchenko
  • 25,884
  • 3
  • 38
  • 56

1 Answers1

0

It looks like your project points to /Applications/Corona-3664/ folder, but it needs to point to the location of your project files, such that the require statement for your project modules work from that location (or you need to adjust package.path values so that Lua interpreter can find the modules you are loading).

In this particular case it looks like the application expects the composer.lua to be in the same folder as main.lua, so try setting your project folder to /Applications/Corona-3664/SampleCode/Interface/Composer/ (although it's better to keep it outside of Applications/ folder).

Paul Kulchenko
  • 25,884
  • 3
  • 38
  • 56
  • "This question doesn't show any research etc."! I do research and study before asking a question. So if I ask a question it means that I didn't find the correct information. For example, as I wrote, I had to reinstall both Corona and ZeroBrane in the exact way and location I installed them the first time. I didn't change anything, but know they don't work as they used to do. I read all instructions I found, but they were of no help. Nowhere I found "package.path" and so on! – nino_user183677 Feb 19 '22 at 08:08
  • 1
    I'm not sure why you address your comment to me, as nowhere in my answer I say anything about not showing your research. Did the answer help you get it working or do you still have the issue? – Paul Kulchenko Feb 19 '22 at 23:38