You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I'm trying to make use of plugin-data-persistence
import { persistToFile } from '@orama/plugin-data-persistence';
I immediately face an error
throw new Error(METHOD_MOVED('persistToFile'));
^
Error: Function persistToFile has been moved to the "/server" module.
Import it via "import { persistToFile } from 'orama/plugin-data-persistence/server'".
I then immediately updated the import to import { persistToFile } from 'orama/plugin-data-persistence/server'
However facing the following import issue
I have then managed to remove the import error by changing the import path to import { persistToFile } from '@orama/plugin-data-persistence/dist/server';
This is leading to the following error
Error: ERR_PACKAGE_PATH_NOT_EXPORTED /Users/DevUser/myCode/nlp/node_modules/@orama/plugin-data-persistence/ ./dist/server /Users/DevUser/myCode/nlp/orama/databaseWrapper.ts
at throwExportsNotFound ( /Users/DevUser/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:380:9)
at packageExportsResolve ( /Users/DevUser/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:605:3)
at packageResolve ( /Users/DevUser/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:746:14)
at moduleResolve ( /Users/DevUser/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:798:18)
at Object.defaultResolve ( /Users/DevUser/node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js:912:11)
I'm using the following command to execute my code node --trace-warnings --loader ts-node/esm driver.ts
To Reproduce
Installed Orama [Worked fine] (latest version)
Installed plugin-data-persistence latest version
Imported {persistToFile} package from import { restoreFromFile } from '@orama/plugin-data-persistence/dist/server';
Executed the node --loader ts-node/esm driver.ts
Faced with the error Error: ERR_PACKAGE_PATH_NOT_EXPORTE
Expected behavior
I expected the import to work normally, which is failing with importing the package component persistToFile
Environment Info
OS: MacOs Sonoma 14.1.2
Node: v21.5.0
Orama: @orama/orama@2.0.3
Orama/plugin-data-persistence: @orama/plugin-data-persistence@2.0.3 [I've tried using old versions of the Plugin package]
Affected areas
Initialization
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
When I'm trying to make use of
plugin-data-persistence
I immediately face an error
I then immediately updated the import to
import { persistToFile } from 'orama/plugin-data-persistence/server'
However facing the following import issue
I have then managed to remove the import error by changing the import path to
import { persistToFile } from '@orama/plugin-data-persistence/dist/server';
This is leading to the following error
I'm using the following command to execute my code
node --trace-warnings --loader ts-node/esm driver.ts
To Reproduce
import { restoreFromFile } from '@orama/plugin-data-persistence/dist/server';
node --loader ts-node/esm driver.ts
Error: ERR_PACKAGE_PATH_NOT_EXPORTE
Expected behavior
I expected the import to work normally, which is failing with importing the package component
persistToFile
Environment Info
OS: MacOs Sonoma 14.1.2 Node: v21.5.0 Orama: @orama/orama@2.0.3 Orama/plugin-data-persistence: @orama/plugin-data-persistence@2.0.3 [I've tried using old versions of the Plugin package]
Affected areas
Initialization
Additional context
No response
The text was updated successfully, but these errors were encountered: