You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue only occurs when using love.js.
I have a game, with a filetree like this:
game/
├── main.lua
└── game.lua
When I attempt to import game.lua from main.lua...
Game=require'game'
I get the error:
Error: main.lua:1: module 'game' not found:
love.js:9 no field package.preload['game']
love.js:9 no 'game' in LOVE game directories.
love.js:9 no file 'game' in LOVE paths.
...
However, when I rename my game folder to something else (like src), it works fine.
Took me forever to figure this out, now it's not much of a problem for me.
Here is how I packaged my game:
love.js game .packaged -t game -c
The text was updated successfully, but these errors were encountered:
This issue only occurs when using love.js.
I have a game, with a filetree like this:
When I attempt to import game.lua from main.lua...
I get the error:
However, when I rename my
game
folder to something else (likesrc
), it works fine.Took me forever to figure this out, now it's not much of a problem for me.
Here is how I packaged my game:
The text was updated successfully, but these errors were encountered: