-
Notifications
You must be signed in to change notification settings - Fork 17
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
Question #82
Comments
Just to clarify, the fetch and webapi adapters are not used, the calls are redirected to sequelize internally, but the system needs them otherwise I get startup errors |
Hmm. Maybe we need a way to detect or specify that Breeze is running in a Sequelize environment, and so doesn't need those other adapters to work. Regarding the ESM errors, can you try using |
Hello, I am indeed using the mjs build. Thank you |
When we install the cjs build, we get a package.json file in each subpackage (e.g. When we install the mjs build, we only get a package.json file in the main package ( The single package.json approach (of the breeze-client mjs build) works fine unless our application's package.json specifies |
Hello,
i have been using breeze-client package on the server with Sequelize using a custom DataManager class and it worked great.
I try to use it with latest ESM spec and I cannot import the adapters, i get the error
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'node_modules\breeze-client\adapter-ajax-fetch' is not supported resolving ES modules imported from system-data\lib\breeze\cBreezeInit.js
Did you mean to import [email protected]/node_modules/breeze-client/bundles/breeze-client-adapter-ajax-fetch.umd.js?
I try to import it like this
import { AjaxFetchAdapter } from "breeze-client/adapter-ajax-fetch";
import { DataServiceWebApiAdapter } from "breeze-client/adapter-data-service-webapi";
import { ModelLibraryBackingStoreAdapter } from "breeze-client/adapter-model-library-backing-store";
Any ideas ? with CommonJS it worked great
I can still do the following but I am looking for a better solution
const require = Module.createRequire(import.meta.url);
require("breeze-client/adapter-ajax-fetch");
require("breeze-client/adapter-data-service-webapi");
require("breeze-client/adapter-model-library-backing-store");
Thanks in advance
The text was updated successfully, but these errors were encountered: