你在干什么?
-
@2412322029 我现在也查一下这个错误, 看看什么原因引起的
error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.047863
-
@sunrisepeak @2412322029 这种方式试一试
-
-
@2412322029 你电脑里的xmake是什么版本啊
-
一样的版本v2.9.7+master.ce35c1abd
-
-
v2.9.7+master.ce35c1abd
-
@2412322029 目前看是同样的代码, 在你的本地执行会报错, 这个还挺奇怪的。试一试手动删除这两个缓冲文件呢
-
问题在环境变量这一步
-
@2412322029 安装脚本里的吗, 还是...
-
for /f "tokens=2*" %%a in ('reg query "HKEY_CURRENT_USER\Environment" /v PATH') do set UserPath=%%b echo %UserPath% | findstr /i "xlings_data" >nul if %errorlevel% neq 0 ( echo [xlings]: set xlings to PATH setx PATH "%XLINGS_BIN_DIR%;%UserPath%" ) else ( echo [xlings]: xlings is already in PATH. )
环境变量中没有但是显示[xlings]: xlings is already in PATH.
-
@2412322029 即使环境变量有问题, 但是直接在core环境下运行代码也不应该报错啊
-
@sunrisepeak commit 是这个
-
xmake 显示error: invalid task: xlings
-
@sunrisepeak 是的
24123@lolik ~\xlings\core git:main > xmake xlings error: cannot import module: xlings, cannot import module: xim.xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.061108
-
-
我删除了环境变量,重新下载git仓库安装
24123@lolik ~\xlings\core git:main > xmake l xim\xim.lua error: cannot import module: xim, cannot import module: CmdProcessor, cannot import module: xim.index.IndexManager, 21.068780
-
xim\xim.lua import("CmdProcessor") 这里没有CmdProcessor这个模块
-
把这个加载配置代码给删除, 显示指定"https://github.com/d2learn/xim-pkgindex" 试一试, 可能是这个问题
-- remote package repo manager -- 1. auto update - enable or disable | day week month -- 2. multi-repo support -- 3. private repo support import("xim.base.runtime") local data_dir = runtime.get_xim_data_dir() local RepoManager = {} RepoManager.__index = RepoManager function new() RepoManager.repos = { "https://github.com/d2learn/xim-pkgindex", } RepoManager.updateSchedule = 30 -- days return RepoManager end function RepoManager:sync() for _, repo in ipairs(self.repos) do print("[xlings: xim]: sync package index repo:", repo) local repodir = _to_repodir(repo) if os.isdir(repodir) then os.cd(repodir) os.exec("git pull") else os.cd(data_dir) os.exec("git clone " .. repo) end end end function RepoManager:repodirs() local dirs = {} for _, repo in ipairs(self.repos) do local repodir = _to_repodir(repo) if not os.isdir(repodir) then os.cd(data_dir) os.exec("git clone " .. repo) end table.insert(dirs, repodir) end return dirs end function _to_repodir(repo) local dir = string.split(path.filename(repo), ".git")[1] local repodir = path.join(data_dir, dir) return repodir end function main() local repoManager = new() repoManager:sync() print(repoManager:repodirs()) print(_to_repodir("my/myrepo")) end
-
@2412322029 和xim.lua同级目录里有