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
Mussten Upgrade der Dependencies reverten: a9bc420
Weil wegen:
node:internal/modules/cjs/loader:1112
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /app/node_modules/node-fetch/src/index.js
require() of ES modules is not supported.
require() of /app/node_modules/node-fetch/src/index.js from /app/built/commands/erleuchtung.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename index.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /app/node_modules/node-fetch/package.json.
at new NodeError (node:internal/errors:370:5)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1112:13)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/app/built/commands/erleuchtung.js:7:15)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32) {
code: 'ERR_REQUIRE_ESM'
}
Wäre cool, wenn wir dementsprechend auch mal auf ES6 Modules switchen könnten. Es muss also auch den CommandHandler refactored werden. Ganz schön dickes Ding hier.
The text was updated successfully, but these errors were encountered:
This module was converted to be a ESM only package in version 3.0.0-beta.10. node-fetch is an ESM-only module - you are not able to import it with require. We recommend you stay on v2 which is built with CommonJS unless you use ESM yourself. We will continue to publish critical bug fixes for it.
Selbst, wenn wir es als ES-Modul importieren würden, hätten wir ein Problem, weil der Import durch die Kompilierung wieder zu einem CommonJS-import gemacht wird.
Die Lösung, damit es wieder geht, ist also ein Downgrade auf v2. Falls wir jemansl ES-Module ausgeben, könnte man auf v3 upgraden.
Oder man verwendet einen anderen Http-Client (z. B: sowas wie needle). Wäre aber eher für node.fetch.
Mussten Upgrade der Dependencies reverten: a9bc420
Weil wegen:
Wäre cool, wenn wir dementsprechend auch mal auf ES6 Modules switchen könnten. Es muss also auch den CommandHandler refactored werden. Ganz schön dickes Ding hier.
The text was updated successfully, but these errors were encountered: