leizongmin / leizongmin/node-segment

Cannot find module "URLTokenizer"

Open
#25 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
132
PR merge metrics
No merged PRs in 30d

Description

At

var filename = path.resolve(__dirname, 'module', module + '.js');
      if (!fs.existsSync(filename)) {

Where filename === "/module/URLTokenizer.js"

I'm importing it inside electron.

Can we change a way to load module?

Contributor guide

No contributing guide indexed for this repository

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 module-loading code shown in the issue and inspect how it constructs the path to module/URLTokenizer.js. Reproduce the Electron import failure and compare the resolved filename with the repository's module layout; done means URLTokenizer loads successfully from Electron.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, javascript, node.js
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.