orama icon indicating copy to clipboard operation
orama copied to clipboard

Circular dependency warning in rollup

Open phun-ky opened this issue 2 years ago • 1 comments

Describe the bug I'm getting a circular dependency warning when importing lyra and stemmer:

rollup v2.79.1
bundles src/dtm.js, src/worker-search → dist...
(!) Circular dependency
node_modules/@lyrasearch/lyra/dist/esm/src/lyra.js -> node_modules/@lyrasearch/lyra/dist/esm/src/tokenizer/index.js -> node_modules/@lyrasearch/lyra/dist/esm/src/lyra.js
created dist in 1.1s

To Reproduce

  1. Use rollup
  2. Import esm stuff as described in Lyra documentation for stemmers

Expected behavior No circular dependencies

Node: 16.17.1 NPM: 8.15.0 Ubuntu 22.04 LTS

phun-ky avatar Nov 15 '22 10:11 phun-ky

I could not reproduce the bug. @phun-ky Do you have a code snippet which I can use for reproduction?

sameer-coder avatar Nov 23 '22 12:11 sameer-coder

Is this still a problem? We changed the way we compile Lyra, so this might be solved

micheleriva avatar Feb 17 '23 13:02 micheleriva

Need to bump and check! 

phun-ky avatar Feb 17 '23 14:02 phun-ky

with 0.4.9I now get:

(!) Plugin node-resolve: Could not resolve import "@lyrasearch/lyra/dist/esm/stemmer/lib/no" in /home/alexander/Workspace/knowit/client/svv/dtm/src/lib/search.js using exports defined in /home/alexander/Workspace/knowit/client/svv/dtm/node_modules/@lyrasearch/lyra/package.json.

instead. Is there a breaking change?

phun-ky avatar Feb 17 '23 14:02 phun-ky