nodejs / nodejs/node-gyp

NSSpellChecker does not return my dictionaries from ~/Library/Spelling

Open
#2,327 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.7k
Forks
1.9k
Avg merge
1d 4h
Merged PRs (30d)
5

Description

  • Node Version: node 12.18.3, npm 6.14.6
  • Platform: MacOS

Hello guys, I'm not really sure where can I send my issue with macOS, so sorry if this is not the right place.

Node-gyp builds my native module which depends on native spell checkers. For some reason when I run build with node Javascript, it doesn't return my dictionaries from ~/Library/Spelling ( it returns only installed 'system languages' )
When I created a simple objective c app in Xcode, it shows me all languages include my dictionaries from folder ~/Library/Spelling

Simple code:

#import "spellchecker.h"

#import <Cocoa/Cocoa.h>
#import <dispatch/dispatch.h>

Spellchecker::Spellchecker() {
    NSLog(@"%@",[[NSSpellChecker sharedSpellChecker] availableLanguages]);
}

Spellchecker::~Spellchecker() {}

Please, any idea why my node-gyp build is different from native?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported node-gyp native-module build and the Objective-C entry point in spellchecker.h; compare its NSSpellChecker availableLanguages result with the simple Xcode app. Confirm whether the discrepancy is in node-gyp or the macOS execution context, and establish a reproducible result before defining what a fix would require.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, nodejs, objective-c
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.