electron-spellchecker
electron-spellchecker copied to clipboard
Module not found: Error: Can't resolve './build/Release/cld'
I added electron-spellchecker 1.1.2 to my package.json and the module compiled just fine.
Other native modules work well.
However I'm getting below error, on both osx and win 64 bit. I'm using electron-webpack.
I added added
import {SpellCheckHandler, ContextMenuListener, ContextMenuBuilder} from 'electron-spellchecker';
to my preload.js but get the following error when I launch electron-webpack dev:
ERROR in ./node_modules/@paulcbetts/cld/index.js
Module not found: Error: Can't resolve './build/Release/cld' in '/Users/johan/projects/smrt-system/electron/node_modules/@paulcbetts/cld'
@ ./node_modules/@paulcbetts/cld/index.js 2:11-41
@ ./node_modules/electron-spellchecker/lib/cld2.js
@ ./node_modules/electron-spellchecker/lib/spell-check-handler.js
@ ./node_modules/electron-spellchecker/lib/index.js
@ ./src/renderer/preload.js
ERROR in ./node_modules/@paulcbetts/spellchecker/build/Release/spellchecker.node
Module parse failed: /Users/johan/projects/smrt-system/electron/node_modules/@paulcbetts/spellchecker/build/Release/spellchecker.node Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/@paulcbetts/spellchecker/lib/spellchecker.js 3:15-60
@ ./node_modules/electron-spellchecker/lib/node-spellchecker.js
@ ./node_modules/electron-spellchecker/lib/index.js
@ ./src/renderer/preload.js
ERROR in ./node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node
Module parse failed: /Users/johan/projects/smrt-system/electron/node_modules/keyboard-layout/build/Release/keyboard-layout-manager.node Unexpected character '�' (1:0)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)
@ ./node_modules/keyboard-layout/lib/keyboard-layout.js 4:30-86
@ ./node_modules/electron-spellchecker/lib/spell-check-handler.js
@ ./node_modules/electron-spellchecker/lib/index.js
@ ./src/renderer/preload.js
It's probably something stupid but thought I'd post here as I couldn't find anyone else with the same problem when searching historical issues.
Same here. Have you found any solution? https://github.com/electron-userland/electron-spellchecker/pull/89 seems to have something related to this but applying the changes does not actually fix the issue.
@baversjo which node version are you using? I suspect that this is not working with node 8 while it's ok with node 6.
@claudio-incomedia Yes, I was using node 8. @paulcbetts Is this project compatible only with node 6/7? Electron has been on node v8.2.1 for a while.
Using node 7.9.0 and running into the issue as well unfortunately.
Any update?
I ran into this yesterday, and got past it by adding node-loader to my webpack config.
module: {
rules: [
{
test: /\.node$/,
use: 'node-loader',
},
],
},
Got same error on following config:
"electron-spellchecker": "2.2.0",
"electron": "5.0.0",
nodejs: 12.6.0
WARNING in ./node_modules/@aabuhijleh/electron-remote/lib/renderer-require.js 26:19-46
Critical dependency: the request of a dependency is an expression
WARNING in ./node_modules/electron-spellchecker/src/promisify.js 4:16-26
Critical dependency: the request of a dependency is an expression
ERROR in ./node_modules/cld/index.js
Module not found: Error: Can't resolve './build/Release/cld' in '/Users/barebuh/Desktop/www/maat/node_modules/cld'
Getting the same issue. Sick!