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

Unable to use dictionary-es with Electron Application #9

Closed
Latentimagedesign opened this issue Mar 12, 2019 · 1 comment
Closed

Unable to use dictionary-es with Electron Application #9

Latentimagedesign opened this issue Mar 12, 2019 · 1 comment

Comments

@Latentimagedesign
Copy link

Latentimagedesign commented Mar 12, 2019

I'm getting an error when I try to load the Spanish dictionary inside of an electron application:

import dictEs from 'dictionary-es'
import nspell from "nspell"
dictEs(ondictionary)
function ondictionary(err, dict) {
            if (err) {
                console.log(err);
                throw err
            }
            var spell = nspell(dict);
        }

Throws this error:

Uncaught Error: ENOENT, renderer\index.aff not found in C:\Users\LID-Mobile\Development\cccreator-desktop\node_modules\electron\dist\resources\electron.asar
    at notFoundError (ELECTRON_ASAR.js:108)
    at fs.readFile (ELECTRON_ASAR.js:536)
    at one (index.js?e606:15)
    at load (index.js?e606:11)
    at Object.initDictionary (globalFunc.js?ff72:529)
    at Store.updateLanguage (store.js?c0d6:204)
    at wrappedMutationHandler (vuex.esm.js?2f62:714)
    at commitIterator (vuex.esm.js?2f62:382)
    at Array.forEach (<anonymous>)
    at eval (vuex.esm.js?2f62:381)

I don't get the same error when loading the
dictionary-en-us or dictionary-en-ca dictionaries.

Thoughts?

@wooorm
Copy link
Owner

wooorm commented Mar 12, 2019

I don’t know. It works for me.

$ node
> es = require('dictionary-es')
[Function: load]
> es(console.log)
undefined
> null { aff:
   <Buffer 53 45 54 20 55 54 46 2d 38 0a 54 52 59 20 61 65 72 6f 69 6e 73 63 74 6c 64 75 6d 70 62 67 66 76 68 7a c3 b3 c3 ad 6a c3 a1 71 c3 a9 c3 b1 78 79 c3 ba ... 167301 more bytes>,
  dic:
   <Buffer 37 31 31 36 35 0a 41 66 67 61 6e 69 73 74 c3 a1 6e 0a 41 6c 62 61 6e 69 61 0a 41 6c 65 6d 61 6e 69 61 0a 41 6d c3 a9 72 69 63 61 0a 41 6e 64 61 6c 75 ... 851713 more bytes> }

Maybe the files are too big. Maybe something with Electron. Maybe the install didn’t work, and you should reinstall your node modules.

@wooorm wooorm closed this as completed Mar 12, 2019
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

2 participants