electron-userland / electron-spellchecker

Implement spellchecking, correctly
MIT License
238 stars 83 forks source link

can't get work fresh install of electron and spellcheker #134

Open WhileList opened 5 years ago

WhileList commented 5 years ago

Hi all. I've got a DevTools disconnected at start at almost empty app when using spellchecker. And I have no guess what to do/change/rebuild/etc. I'm totally stuck for five days with this. There are my steps:

  1. nvm use 10.11.0 ( for gyp compile with correct NODE_MODULE_VERSION, before I get a console message about incorrect NODE_MODULE_VERSION when build it with latest node)
  2. I make a fresh install of electron by cloning "git clone https://github.com/electron/electron-quick-start"
  3. then "npm install". Electron 4.0.4 works great.
  4. then "npm install electron-prebuilt-compile" . Electron version changes to 4.0.0. Hello world report to "We are using Node.js 10.11.0, Chromium 69.0.3497.106, and Electron 4.0.0."
  5. then "npm install electron-spellchecker". All is good, except some warnings while compiling, but no errors.
  6. In renderer.js make insert from QuickStart section:

import {SpellCheckHandler, ContextMenuListener, ContextMenuBuilder} from 'electron-spellchecker';

window.spellCheckHandler = new SpellCheckHandler(); window.spellCheckHandler.attachToInput();

// Start off as US English, America #1 (lol) window.spellCheckHandler.switchLanguage('en-US');

let contextMenuBuilder = new ContextMenuBuilder(window.spellCheckHandler); let contextMenuListener = new ContextMenuListener((info) => { contextMenuBuilder.showPopupMenu(info); });

and insert an empty textarea in index.html. Restarting app and get nothing to work. Only message that DevTools disconnecting: image

  1. Then I comment //window.spellCheckHandler.switchLanguage('en-US'); and app works without errors, but no spelling checks.

So, I can't see any error message, only crash of Electron window, and dont know what to do. May be using a electron-prebuilt-compile is not a good idea?

WhileList commented 5 years ago

I tried to install/run example, it works great. At first, I get an console error message about unexisting module "@paulcbetts/spellchecker", but after manual install ('npm install @paulcbetts/spellchecker') everything is okay. Version output for this installation is: We are using Node.js 7.4.0, Chromium 56.0.2924.87, and Electron 1.6.4. Now I'll try to fresh install with this versions.