Open yancy9303 opened 5 years ago
Hi Yancy. You need to install node.js then first run
> node
Then run
var hanzi = require("hanzi");
I installed note.js and npm. But it is still not work.
Yancy.
获取 Outlook for iOShttps://aka.ms/o0ukef
发件人: Roger Zurawicki notifications@github.com 发送时间: Friday, November 1, 2019 10:45:11 PM 收件人: nieldlr/hanzi hanzi@noreply.github.com 抄送: yancy9303 yanghuilanhn@hotmail.com; Author author@noreply.github.com 主题: Re: [nieldlr/hanzi] I have trouble to initiate HanziJS. Required. (#59)
Hi Yancy. You need to install node.js then first run
node
Then run
var hanzi = require("hanzi");
― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/nieldlr/hanzi/issues/59?email_source=notifications&email_token=ANUVSINSWWUW6T3GMSYS5BLQRTSTPA5CNFSM4JHRX3Q2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEC4SAFQ#issuecomment-549003286, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANUVSIOGJBCVKEJM63FC3N3QRTSTPANCNFSM4JHRX3QQ.
You need to run that code inside of the node program. From your error, it looks like you are running the code in a command prompt. First type node to run the node program, then try running your code.
@yancy9303
1) Install node
2) Make a file myfile.js
3) In myfile.js
put:
var hanzi = require("hanzi");
hanzi.start()
...
4) From command line enter > node myfile.js
C:\Users\yangh>var hanzi = require("hanzi"); 'var' is not recognized as an internal or external command, operable program or batch file.
I successfully installed node and npm, but I am having trouble to initiate hanzi. How could I slove this problem? I am new to npm. It is a great package for language researcher. Thanks.
Yancy