skishore / makemeahanzi

Free, open-source Chinese character data
https://www.skishore.me/makemeahanzi/
Other
1.83k stars 465 forks source link

How to run tool branch in Meteor? #49

Open lovelwpeng opened 5 years ago

lovelwpeng commented 5 years ago

I'm using Window 10. I checkout the tool branch, had installed mongodb and Meteor, but I can not run it normal. Can you help me?

http://localhost:3000/

F:\HSK\makemeahanzi-b-tool.meteor\local\build\programs\server\app\app.js:4808 if (error) throw error; // 68 ^

Error: ENOENT: no such file or directory, open 'F:\HSK\makemeahanzi-b-tool.meteor\cjklib\characterdecomposition.csv' at Error (native) Exited with code: 1 Your application is crashing. Waiting for file change.

skishore commented 5 years ago

That path is using this "getPWD" ("get path to working directory") helper to construct a path to look up the CJKlib data. On Mac and Linux the PWD is provided by Meteor, but on Windows, it's constructed here: https://github.com/skishore/makemeahanzi/blob/tool/lib/base.js#L23

Maybe the Windows path has changed in some newer version of Meteor. Could you try fixing it there?

lovelwpeng commented 5 years ago

I do not know much about Meteor, I just change https://github.com/skishore/makemeahanzi/blob/tool/lib/cjklib.js#L66 to the code:

    const filepath = Assets.absoluteFilePath(filename);

It runs normally, but I backward the code, it still runs well. And I run Meteor.call('export'); in broswer console, seems nothing happened. I do not know why?

skishore commented 5 years ago

Can you check the logs on the Meteor server, or run git status? The logs should show a migration running over the database, and git status should show the existence of the exported files.

lovelwpeng commented 5 years ago
W20180929-18:08:36.211(8)? (STDERR) [Error: Unknown asset: gb2312]
I20180929-18:08:42.860(8)? Running migration...
I20180929-18:08:42.864(8)? Exception while invoking method 'exportSVGs' TypeError: Cannot read property 'map' of null
I20180929-18:08:42.865(8)?     at server/migration.js:180:25
I20180929-18:08:42.866(8)?     at runMigration (server/migration.js:233:13)
I20180929-18:08:42.866(8)?     at [object Object].exportSVGs (server/migration.js:178:5)
I20180929-18:08:42.867(8)?     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1711:12)
I20180929-18:08:42.868(8)?     at packages/ddp-server/livedata_server.js:711:19
I20180929-18:08:42.868(8)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20180929-18:08:42.869(8)?     at packages/ddp-server/livedata_server.js:709:40
I20180929-18:08:42.869(8)?     at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
I20180929-18:08:42.870(8)?     at packages/ddp-server/livedata_server.js:707:46
I20180929-18:08:42.870(8)?     at Session.method (packages/ddp-server/livedata_server.js:681:23)

It's also the PWD problem, I would try to read the code and figure out that. Thanks!!!