cannot load external package on studio code- ubuntu desktop

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
konstantinosdms
Prole
Posts: 1
Joined: Sun Oct 29, 2023 11:36 pm

cannot load external package on studio code- ubuntu desktop

Post by konstantinosdms »

My > print(package.path)
/usr/local/bin/lua;/usr/local/share/lua/5.4/?.lua;/usr/local/share/lua/5.4/?/init.lua;/usr/local/lib/lua/5.4/?.lua;/usr/local/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua
My > print(package.cpath)
/usr/local/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/posix/sys/

My echo $LUA_CPATH
/usr/local/lib/lua/5.4/?.so;/usr/local/lib/lua/5.4/posix/sys/
My echo $LUA_PATH
/usr/local/bin/lua;;

my studio code:

Code: Select all

module 'posix.signal' not found:
no field package.preload['posix.signal']
no file '/home/konstantinos/Desktop/server/lua-apps/posix/signal.lua'
no file '/home/konstantinos/Desktop/server/lua-apps/posix/signal.lua'
no file '/home/konstantinos/Desktop/server/lua-apps/posix/signal.so'
no file '/home/konstantinos/Desktop/server/lua-apps/posix/signal.so'
no file '/home/konstantinos/Desktop/server/lua-apps/posix.so'
no file '/home/konstantinos/Desktop/server/lua-apps/posix.so'
on local posix = require('posix.signal'), 
seraches on the path i have my
deployment folder.

s. code launch.json file

Code: Select all

"configurations": [
{
"type": "lua",
"request": "launch",
"name": "Debug",
"program": "${workspaceFolder}/lua.lua",
"cpath": "${env:LUA_CPATH}"
}
]
from command line:

Code: Select all

lua lua.lua
lua: error loading module 'cjson' from file '/usr/local/bin/lua':
	/usr/local/bin/lua:1: unexpected symbol near '<\127>'
stack traceback:
	[C]: in ?
	[C]: in function 'require'
	lua.lua:3559: in main chunk
	[C]: in ?
Any suggestion?
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 50 guests