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

nadesiko3-ml を使ったソースファイルを cnako3 -c でコンパイルしてできる .mjs を node で実行できない #1865

Open
puni073 opened this issue Dec 16, 2024 · 0 comments

Comments

@puni073
Copy link

puni073 commented Dec 16, 2024

cat Main.nako3

!「nadesiko3-ml」を取り込む。
# SVMでXORデータを学習する例
XORデータ=[[0, 0], [1, 1], [1, 0], [0, 1]]
XORラベル=[0,0,1,1]

# --- SVMを使う場合 ---
{}でSVM開く
# 学習
XORデータとXORラベルで学習。
# 予測
A=[[0,0],[1,1],[1,0]]で予測
AをJSONエンコードして表示。# [0,0,1]

cnako -c Main.nako3
node --trace-uncaught Main.mjs

TypeError: __self.__varslist[0].get(...) is not a function
    at __eval_nako3sync_1734381746890_660993395__ (file:///judge/Main.mjs:104:52)
    at file:///judge/Main.mjs:123:1
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:336:24)
    at async loadESM (node:internal/process/esm_loader:34:7)
    at async handleMainPromise (node:internal/modules/run_main:106:12) l6:Main.nako3
undefined

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
undefined
Thrown at:
    at loadESM (node:internal/process/esm_loader:40:33)


Node.js v18.19.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant