question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module not found: Error: Can't resolve './build/Release/cld'

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:9
  • Comments:8

github_iconTop GitHub Comments

2reactions
iKBAHTcommented, Jul 16, 2019

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'
2reactions
chrismohrcommented, Oct 11, 2018

I ran into this yesterday, and got past it by adding node-loader to my webpack config.

module: {
  rules: [
    {
      test: /\.node$/,
      use: 'node-loader',
    },
  ],
},
Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues - GitHub
The issue appears to occur when a module rebuild occurs. It seems that yarn will delete built modules more aggressively than npm when...
Read more >
Webpack suddenly fails to compile due to "Module not found ...
It's an issue with the Webpack or Jest configuration. Absolute and relative paths can both be used, but be aware that they will...
Read more >
module not found error can't resolve 'fs' in react js - You.com
The "Module not found: Can't resolve 'fs'" error in React is caused by a missing or incorrect dependency. To solve this problem, you...
Read more >
Getting build errors building browser extension locally
Hello, I was trying to build the browser extension locally but i'm having build ... Module not found: Error: Can't resolve 'buffer' in ......
Read more >
module-not-found - Next.js
Why This Error Occurred · The module you're trying to import is not installed in your dependencies · The module you're trying to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found