Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION] #15

Open
chance30 opened this issue Jul 31, 2023 · 10 comments
Open

[QUESTION] #15

chance30 opened this issue Jul 31, 2023 · 10 comments
Assignees
Labels
bug Something isn't working

Comments

@chance30
Copy link

你遇到的问题
清晰而简洁的 描述一下你遇到的问题。
编译上传 运行 以后 日志里面报错 the ‘show console’ field in the configuration is invalid

@batu1579 batu1579 self-assigned this Aug 7, 2023
@batu1579 batu1579 added the bug Something isn't working label Aug 7, 2023
batu1579 added a commit that referenced this issue Aug 7, 2023
将显示控制台选项的类型改为复选框,直接获取布尔值,减少了出错的可能。并且给选项添加了默认值。

#15
@batu1579
Copy link
Owner

batu1579 commented Aug 7, 2023

现在应该已经修复辣~

@spirit223
Copy link

fork这个仓库后直接打包还是会出现
The 'show console' field in the configuration is invaild
这个控制台检查是无法绕过的吗,我检查了我的config.json里面json数组第二个对象的"value"字段是true, 并且我的hamibot悬浮窗权限已经开始并可以正常使用hamibot悬浮球
如果不可绕过那我应该通过什么办法才能够正常运行脚本?

@batu1579
Copy link
Owner

抱歉我才看到,我这里是可以正常使用的。你试试用那个VSCode的插件直接创建项目,我刚新建了一个跑起来是没有报错的。

// index.ts 中的代码
import {} from "./global";
import { init } from "./lib/init";

init();

log(hamibot.env)

image

但是好像默认值的设置有问题,我正在检查。

@batu1579 batu1579 mentioned this issue Aug 21, 2023
@batu1579
Copy link
Owner

现在应该没有问题了,我调整了默认值的字段(问了一下才知道默认值的字段是 default QAQ)

@spirit223
Copy link

十分感谢🥰

@wanafan
Copy link

wanafan commented Oct 22, 2023

17:42:08.075/E: Error: The 'SHOW CONSOLE' field in the configuration is invalid, undefined. please check it again ! (6534c6390cfca0f22cbca128.js#763)
Error: The 'SHOW CONSOLE' field in the configuration is invalid, undefined. please check it again !
at 6534c6390cfca0f22cbca128.js:763:0
at 6534c6390cfca0f22cbca128.js:4:0

貌似和前面的大哥一样错误,使用的都是最新的软件版本

@jianghaodn
Copy link

jianghaodn commented Nov 6, 2023

17:42:08.075/E: Error: The 'SHOW CONSOLE' field in the configuration is invalid, undefined. please check it again ! (6534c6390cfca0f22cbca128.js#763) Error: The 'SHOW CONSOLE' field in the configuration is invalid, undefined. please check it again ! at 6534c6390cfca0f22cbca128.js:763:0 at 6534c6390cfca0f22cbca128.js:4:0

貌似和前面的大哥一样错误,使用的都是最新的软件版本

我之前也是这个错误,然后我修改了global.ts当中的部分判断,让它不要去检查就行了。新版的我还没用

@PanYuntao
Copy link

新拉的的代码遇到同样的问题,除了修改global.ts判断还有啥别的方式吗

@batu1579
Copy link
Owner

新拉的的代码遇到同样的问题,除了修改global.ts判断还有啥别的方式吗

可以查看一下配置文件中“显示控制台“字段的默认值具体是什么。

我记得之前测试这个问题被修好了哇QAQ

@PanYuntao
Copy link

PanYuntao commented Sep 27, 2024

是不是配置的不对?global中_SHOW_CONSOLE还是获取不到,我这样配置的:

  • config.json
[
    {
        "name": "_TOKEN",
        "type": "text",
        "label": "pushplus 的用户 Token",
        "help": "可以在 pushplus 的微信公众号中获取,不使用 pushplus 则留空"
    },
    {
        "label": "显示控制台(需要悬浮窗权限)",
        "type": "checkbox",
        "name": "_SHOW_CONSOLE",
        "default": true
    }
  • 脚本配置文件,设置true
{
    "label": "显示控制台(需要悬浮窗权限)",
    "type": "select",
    "name": "SHOW_CONSOLE",
    "options": {
      "true": "",
      "false": ""
    },
    "validation": "required",
    "help": "下拉选择的帮助说明"
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants