We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
when trying to use ES Modules, many of the default Model methods are missing from my classes.
interestingly the asset.save method doesn't throw an error?
asset.save
where Asset is just a model:
@Table export class Asset extends Model {
├─┬ [email protected] │ └── [email protected] deduped └── [email protected] └── [email protected] ├─┬ [email protected] │ └── [email protected] deduped ├─┬ [email protected] │ └── [email protected] deduped └── [email protected]
cannot call basic sequelize methods on any model such as MyModel.truncate() or MyModel.create()
MyModel.truncate()
MyModel.create()
where MyModel is a subclass of Model
MyModel
Model
should be able to create!
have to use ESM modules
This is all configuration bullshit. I'm putting my tsconfig and package.json below.
{ "compilerOptions": { "rootDir": "src", "outDir": "./build", "lib": [ "ESNext" ], "module": "NodeNext", "moduleResolution": "NodeNext", "target": "es2022", "esModuleInterop": true, "types": [ "node" ], "sourceMap": true, "strict": true, "strictPropertyInitialization": false, "baseUrl": "./src", "paths": { "@sharedTypes/*": [ "../../client/src/types/shared/*" ] }, "experimentalDecorators": true, "emitDecoratorMetadata": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true, "resolveJsonModule": true, "allowJs": false }, "include": [ "src/**/*", "../../client/src/types/**/*" ], "exclude": [ "node_modules" ], "typedocOptions": { "entryPoints": [ "src/server.ts" ], "out": "docs/build" }, "ts-node": { "esm": true, "experimentalSpecifierResolution": "node", "require": [ "tsconfig-paths/register" ] } }
and top of package.json
{ "name": "plugbot-server", "version": "0.0.3", "description": "A framework for extensible crypto related discord bots with plugins", "main": "index.js", "type": "module", ... "nodemonConfig": { "ignore": [ "*.json" ], "events": { "start": "clear || cls" } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issue
when trying to use ES Modules, many of the default Model methods are missing from my classes.
interestingly the
asset.save
method doesn't throw an error?where Asset is just a model:
Versions
Issue type
Actual behavior
cannot call basic sequelize methods on any model such as
MyModel.truncate()
orMyModel.create()
where
MyModel
is a subclass ofModel
Expected behavior
should be able to create!
Steps to reproduce
have to use ESM modules
Related code
This is all configuration bullshit. I'm putting my tsconfig and package.json below.
and top of package.json
The text was updated successfully, but these errors were encountered: