LuaHelper icon indicating copy to clipboard operation
LuaHelper copied to clipboard

reGetSock fail后尝试require("socket.core")时提示找不到指定的模块

Open cyb233 opened this issue 3 years ago • 4 comments

Windows PowerShell
版权所有 (C) Microsoft Corporation。保留所有权利。

尝试新的跨平台 PowerShell https://aka.ms/pscore6

PS C:\Users\Admin\Documents\vscode_project> c:/Users/Admin/.vscode/extensions/yinfei.luahelper-0.2.19/debugger/luasocket/win/x64/lua5.4/lua54.exe -e  "package.path = 'c:/Users/Admin/.vscode/extensions/yinfei.luahelper-0.2.19/debugger/?.lua;'.. package.path;  package.cpath = 'c:/Users/Admin/.vscode/extensions/yinfei.luahelper-0.2.19/debugger/luasocket/win/x64/lua5.4/?.dll;'.. package.cpath; require('LuaPanda').start('127.0.0.1',8818);" "c:/Users/Admin/Documents/vscode_project/1.lua"
[LuaPanda] [Error] reGetSock fail
[LuaPanda] [Error] Start debugger but get Socket fail , please install luasocket!
1
PS C:\Users\Admin\Documents\vscode_project> cd C:\Users\Admin\.vscode\extensions\yinfei.luahelper-0.2.19\debugger\luasocket\win\x64\lua5.4\
PS C:\Users\Admin\.vscode\extensions\yinfei.luahelper-0.2.19\debugger\luasocket\win\x64\lua5.4> .\lua54
Lua 5.4.2  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> require("socket.core")
error loading module 'socket.core' from file 'C:\Users\Admin\.vscode\extensions\yinfei.luahelper-0.2.19\debugger\luasocket\win\x64\lua5.4\socket\core.dll':
        找不到指定的模块。

stack traceback:
        [C]: in ?
        [C]: in function 'require'
        stdin:1: in main chunk
        [C]: in ?
>   

image

cyb233 avatar Oct 05 '22 12:10 cyb233

解决了吗哥

AstroWYH avatar Nov 23 '23 08:11 AstroWYH

解决了吗哥

没有,没人回复就不用了

cyb233 avatar Nov 26 '23 09:11 cyb233

Solution here in another issue ( https://github.com/Tencent/LuaHelper/issues/8 ). You need to set the packagePath to include the directory.

MarioRicalde avatar Jul 17 '24 02:07 MarioRicalde