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
And when loading this model via query.preload('some'), an error occurs:
TypeError: Cannot read properties of undefined (reading 'primaryKey') at CamelCaseNamingStrategy.relationLocalKey
By the way, if you import the model directly (not from the re-export file), everything works perfectly. It feels like there are some disagreements between the environment settings in node_modules dependencies and my project. In my CamelCaseNamingStrategy implementation, I do not override the relationLocalKey method.
I don't know what i should do for solve this problem. Even don't know how i should research it. Will very appreciate it, if you help me.
What i tried to solve this problem:
Set following compiler options to my tsconfig.json
node:internal/errors:484
ErrorCaptureStackTrace(err);
^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for /Users/dz/Work/backend/ace. Loading extensionless files is not supported inside of "type":"module" package.json contexts. The package.json file /Users/dz/Work/backend/package.json caused this "type":"module" context. Try changing /Users/dz/Work/backend/ace to have a file extension. Note the "bin" field of package.json can point to a file with an extension, for example {"type":"module","bin":{"ace":"./ace.js"}}
And also tried add some options to my package.json:
"type": "module",
"bin": {
"ace": "./ace.js"// or just ./ace
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Case:
There is module "A" and module "B". Module "A" re-exports its dependencies and module "B" imports them.
What re-exports the module "А":
Problem:
In the "B" module, the entity model has a relation to the model from the module "А"
And when loading this model via
query.preload('some')
, an error occurs:By the way, if you import the model directly (not from the re-export file), everything works perfectly. It feels like there are some disagreements between the environment settings in
node_modules
dependencies and my project. In myCamelCaseNamingStrategy
implementation, I do not override therelationLocalKey
method.I don't know what i should do for solve this problem. Even don't know how i should research it. Will very appreciate it, if you help me.
What i tried to solve this problem:
Set following compiler options to my
tsconfig.json
But it occur an error:
And also tried add some options to my
package.json
:Beta Was this translation helpful? Give feedback.
All reactions