Discussion:
Processed: eslint: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/share/nodejs/strip-json-comments/index.js
(too old to reply)
Debian Bug Tracking System
2021-09-12 15:20:01 UTC
Permalink
affects -1 gnome-shell-extension-appindicator
Bug #994137 [eslint] eslint: Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: /usr/share/nodejs/strip-json-comments/index.js
Added indication that 994137 affects gnome-shell-extension-appindicator
--
994137: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994137
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Debian Bug Tracking System
2021-09-12 15:30:02 UTC
Permalink
found -1 4.0.0-1
Bug #994137 [node-strip-json-comments] node-strip-json-comments no more provides commonjs files
Marked as found in versions node-strip-json-comments/4.0.0-1.
--
994137: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994137
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Yadd
2021-09-12 15:30:02 UTC
Permalink
Control: found -1 4.0.0-1
Package: eslint
Version: 5.16.0~dfsg+~4.16.8-5
Severity: grave
Justification: renders package unusable
Control: affects -1 gnome-shell-extension-appindicator
Original steps to reproduce: rebuild gnome-shell-extension-appindicator
Minimized steps to reproduce: eslint --version
Expected result: eslint runs
Problem is in node-strip-json-comments since 4.0.0-1:

$ node -e 'require("strip-json-comments")'
internal/modules/cjs/loader.js:1015
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module:
/home/xavier/dev/debian/src/pkg-js/packages/node-strip-json-comments/index.js
require() of ES modules is not supported.
require() of
/home/xavier/dev/debian/src/pkg-js/packages/node-strip-json-comments/index.js
from
/home/xavier/dev/debian/src/pkg-js/packages/node-strip-json-comments/[eval]
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
/home/xavier/dev/debian/src/pkg-js/packages/node-strip-json-comments/package.json.

at Object.Module._extensions..js
(internal/modules/cjs/loader.js:1015:13)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at [eval]:1:1
at Script.runInThisContext (vm.js:120:18)
at Object.runInThisContext (vm.js:309:38)
at Object.<anonymous> ([eval]-wrapper:10:26)
at Module._compile (internal/modules/cjs/loader.js:999:30) {
code: 'ERR_REQUIRE_ESM'
}
Debian Bug Tracking System
2021-09-12 16:10:02 UTC
Permalink
tag -1 pending
Bug #994137 [node-strip-json-comments] node-strip-json-comments no more provides commonjs files
Added tag(s) pending.
--
994137: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994137
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Yadd
2021-09-12 16:10:03 UTC
Permalink
Control: tag -1 pending

Hello,

Bug #994137 in node-strip-json-comments reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/js-team/node-strip-json-comments/-/commit/9e88821829e9b78c85ceff31d360a8f0489c88e8

------------------------------------------------------------------------
Build commonjs file

Closes: #994137
------------------------------------------------------------------------

(this message was generated automatically)
--
Greetings

https://bugs.debian.org/994137
Debian Bug Tracking System
2021-09-12 16:40:02 UTC
Permalink
Your message dated Sun, 12 Sep 2021 16:33:51 +0000
with message-id <E1mPSQR-0003z3-***@fasolo.debian.org>
and subject line Bug#994137: fixed in node-strip-json-comments 4.0.0-3
has caused the Debian Bug report #994137,
regarding node-strip-json-comments no more provides commonjs files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
994137: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994137
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...