Kuroshiro looks for dict in home directory
Closed this issue · 0 comments
emccorson commented
gulp generate
fails because Kuroshiro is looking for the directory dict
in the home directory.
I think the correct directory is node_modules/kuromoji/dict
.
eric@x1:~/src/onsen.io$ gulp generate --lang en
[12:51:18] Language: --lang=en
[12:51:18] Environment: staging
[12:51:18] Source: './src/documents_en'
[12:51:18] Destination: './out_en'
[12:51:18] Using gulpfile ~/src/onsen.io/gulpfile.js
[12:51:18] Starting 'generate'...
[12:51:18] Starting 'less'...
[12:51:19] Finished 'less' after 874 ms
[12:51:19] Starting 'metalsmith'...
[12:51:20] 'metalsmith' errored after 1.26 s
[12:51:20] Error: Kuroshiro initialize failed! Error: ENOENT: no such file or directory, open '/home/eric/dict/check.dat.gz'
at formatError (/home/eric/.nvm/versions/node/v10.14.1/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/format-error.js:20:10)
at Gulp.<anonymous> (/home/eric/.nvm/versions/node/v10.14.1/lib/node_modules/gulp/node_modules/gulp-cli/lib/versioned/^4.0.0/log/events.js:31:15)
at Gulp.emit (events.js:187:15)
at Gulp.EventEmitter.emit (domain.js:442:20)
at Object.error (/home/eric/src/onsen.io/node_modules/undertaker/lib/helpers/createExtensions.js:61:10)
at handler (/home/eric/src/onsen.io/node_modules/now-and-later/lib/mapSeries.js:43:14)
at f (/home/eric/src/onsen.io/node_modules/once/once.js:25:25)
at f (/home/eric/src/onsen.io/node_modules/once/once.js:25:25)
at tryCatch (/home/eric/src/onsen.io/node_modules/async-done/index.js:24:15)
at done (/home/eric/src/onsen.io/node_modules/async-done/index.js:40:12)
at Domain.onError (/home/eric/src/onsen.io/node_modules/async-done/index.js:51:5)
at Object.onceWrapper (events.js:273:13)
at Domain.emit (events.js:182:13)
at Domain.EventEmitter.emit (domain.js:442:20)
at Domain._errorHandler (domain.js:224:23)
at Object.setUncaughtExceptionCaptureCallback (domain.js:140:29)
at process._fatalException (internal/bootstrap/node.js:490:31)
[12:51:20] 'generate' errored after 2.14 s
The quick workaround is to symlink node_modules/kuromoji/dict
to the home directory.