Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadRadixNode encountered type error when using @orama/plugin-vitpress #843

Open
yunseop-dev opened this issue Nov 19, 2024 · 0 comments
Open

Comments

@yunseop-dev
Copy link

Describe the bug

  1. After installing the plugin, the message 'Loading Searchbox...' appears in the Searchbox component and does nothing

function loadRadixNode(node) {
    const convertedNode = radix_create(node.e, node.s, node.k);
    convertedNode.d = node.d;
    convertedNode.w = node.w;
    for (const childrenKey of Object.keys(node.c)){
        convertedNode.c[childrenKey] = loadRadixNode(node.c[childrenKey]);
    }
    return convertedNode;
}

Runtime error occurs when node.c is undefined in the above function

  1. When running with pnpm docs:dev, the following log occurs on CLI
6:14:24 PM [vitepress] Failed to load source map for /Users/my-mac/development/my-proj/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@oramacloud+client@1_cv3rpvjpwmenn6erd35pvfjqx4/node_modules/@orama/searchbox/dist/index.js.
Error: An error occurred while trying to read the map file at index.js.map
Error: ENOENT: no such file or directory, open '/Users/my-mac/development/my-proj/node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected]_@oramacloud+client@1_cv3rpvjpwmenn6erd35pvfjqx4/node_modules/@orama/searchbox/dist/index.js.map'

To Reproduce

  1. create new index
  2. import @orama/plugin-vitpress on vitepress project

Expected behavior

Should be searched normally

Environment Info

OS: macos 14.3.1(23D60)
"@orama/plugin-vitepress": "^3.0.1",
node: v20.11.0
pnpm: 9.12.3

Affected areas

Search

Additional context

I tried it with yarn, but the same symptoms happened

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant