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
constsub=appRequire(name+'/'+subName);if(name==='drizzle-orm'&&subName==='relations'){console.log(lib[subName]&&(lib[subName]===sub[subName]));// true}lib[subName]=sub;// the error is here
TypeError: Cannot set property relations of #<Object> which has only a getter
at loadModule (node_modules\impress\lib\deps.js:63:24)
at Object.<anonymous> (node_modules\impress\lib\deps.js:89:13)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)
at Module._load (node:internal/modules/cjs/loader:1023:12)
at Module.require (node:internal/modules/cjs/loader:1235:19)
at require (node:internal/modules/helpers:176:18)
at Object.<anonymous> (node_modules\impress\lib\planner.js:3:32)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
Impress and Node.js versions
impress: 3.0.13, node: v21.1.0
Platform
No response
Describe the bug
[email protected]
First the module loader loads the main package which imports a
relations
module which exports arelations
function.node_modules/drizzle-orm/index.cjs
https://github.com/drizzle-team/drizzle-orm/blob/0d833d1ca78735e29b124e2a672bda2c85738f48/drizzle-orm/src/index.ts#L10
node_modules/drizzle-orm/relations.cjs
https://github.com/drizzle-team/drizzle-orm/blob/0d833d1ca78735e29b124e2a672bda2c85738f48/drizzle-orm/src/relations.ts#L495
Then it tries to load a
relations
submodule (the same name as the function that was already loaded).node_modules/drizzle-orm/package.json
So
lib[subName]
is already exists and it points to the same object assub.relations
.I added this debug code here:
impress/lib/deps.js
Lines 57 to 58 in 4cabe81
sql
submodule is also have this problem.To Reproduce
npm i [email protected]
npm start
Expected behavior
No response
Screenshots
No response
Additional context
All
drizzle-orm
's transpiled code can be found here: https://www.npmjs.com/package/drizzle-orm?activeTab=codeThe text was updated successfully, but these errors were encountered: