I’m trying to update one of my old games I released in 2014, which required me to switch from storyboard to composer.
One of my more recent games uses composer instead of storyboard, and the updated version has been successfully deployed, so I’m pretty confident that the changes made from storyboard to composer is working.
But no matter what I do, I can’t get passed the main.lua on simulator due to a runtime error.
I have no intention of including facebook plugin, and I believe I removed all possible reasons why facebook plugin may be called for.
Can anyone think of any reason why I get this runtime error?
RROR: Runtime error
module ‘facebook’ not found:
no field package.preload[‘facebook’]
no file ‘/Users/x/Library/Application Support/Corona/Simulator/Plugins/facebook.lua’
no file ‘facebook.lua’
no file ‘/Applications/Corona-3583/Corona Simulator.app/Contents/Resources/facebook.lua’
no file ‘/Users/x/Library/Application Support/Corona/Simulator/Plugins/facebook.dylib’
no file ‘./facebook.dylib’
no file ‘/Applications/Corona-3583/Corona Simulator.app/Contents/Resources/facebook.dylib’
stack traceback:
[C]: in function ‘error’
?: in function ‘gotoScene’
main.lua:1228: in main chunk
What do I need to do to get past this? I’m out of ideas at this point.
Please please please help!
FYI, I’m using Version 2020.3583 (2020.5.28), and when I open up Terminal and do this:
cd ~/Library/Application Support/Corona/Simulator/Plugins
I get:
Naomis-MacBook-Pro:~ x$ cd ~/Library/Application Support/Corona/Simulator/Plugins
-bash: cd: /Users/x/Library/Application: No such file or directory
[Solution] I needed to look at every lua file in my project to ensure facebook isn’t required in any of the file. Once removed, it worked just fine.
I’m using BBEdit, and when I do search for “facebook” in the scene I’m loading, nothing comes up.
In the scene I’m loading, I require the following:
local composer = require( “composer” )
local scene = composer.newScene()
composer.recycleOnSceneChange = true;
local gameNetwork = require( “gameNetwork” )
local widget = require( “widget” )
local popup = require( “popup” )
local stats = require( “stats” )
local loadsave = require( “loadsave” )
local tips = require( “tips” )
I created popup.lua, stats.lua, loadsave.lua and tips.lua, and none of them has any reference to facebook nor storyboard.
Any idea? I’d so appreciate your help.
Commenting out local gameNetwork = require( “gameNetwork” ) does not make any difference. So, I don’t understand why the scene I’m trying to load is looking for facebook.lua.
Can you make a global search of the word “Facebook” on your project?
It happens when your scene is being loaded, but it literally can be anywhere on your project. You could be importing a file that imports to another which tries to import “Facebook”.
And what I meant was that every search tool have the option to enable regular expressions which allows you to do more complex searches. If you turn on that feature and search for require.*facebook I think you will find the error.
If you really can’t find it, you will have to comment all your scene, and then uncomment it little by little running your game on every step, keeping it working until the error reappears, then you will know where the error is coming from.
Ah, yes. That sounds just about right. I’ll convert all lua files from storyboard to composer, and also look for facebook. When I’m done, I’ll report back.