Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1012162: nodejs: Backports version for Bullseye

111 views
Skip to first unread message

Pirate Praveen

unread,
Sep 3, 2022, 12:20:03 PM9/3/22
to
On Tue, 31 May 2022 07:05:00 +0000 Eerste Laatste
<hoek...@hotmail.com> wrote:
> Would it be possible to have a backports version of nodejs for
Bullseye?
> I am running into problems for example with logical assignment
operators
> that are supported since NodeJS 15.0.0.

We would like a newer nodejs for gitlab as well. node-yaml 2.x fails
with

# nodejs -e 'require("yaml")';
/usr/share/nodejs/yaml/dist/compose/composer.js:33
if (prelude[i + 1]?.[0] !== '#')
^

SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:1027:10)
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 Object.<anonymous> (/usr/share/nodejs/yaml/dist/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js
(internal/modules/cjs/loader.js:1027:10)

as a temporary fix, getting node-yaml backports to transpile correctly
to be run with nodej 12 will also be good (though eventually more and
more modules are going to need newer nodejs, so an updated nodejs will
help till we get next stable version).

I tried different babel options but none of them seems to be working
for optional chaining operator transpiling. I tried target node 12 for
babel preset env, tried explicitly adding this plugin for optional
chaining operator etc (by patching config/babel.config.js - adding top
level preset as well as adding to overrides).

Mohd Bilal

unread,
Sep 3, 2022, 12:41:38 PM9/3/22
to
On 9/3/22 21:44, Pirate Praveen wrote:

> We would like a newer nodejs for gitlab as well. node-yaml 2.x fails with
>

I made a try in building nodejs18 from backports and seems like we may
need higher versions for certain libraries in backports and also some
node modules that are not available in bpo.

Required Versions | Current Version(stable/bpo)
------------------------------------------------------
libc-ares-dev (>= 1.18.1~) | 1.17.1-1+deb11u1
libicu-dev (>= 70.1~) | 67.1-7
libuv1-dev (>= 1.43.0~) | 1.40.0-2
node-undici (>= 5.0.0~) | -
node-marked (>= 4~) | 0.8.0+ds+repack-2
node-js-yaml |
(>= 4.1.0+dfsg+~4.0.5-6) | 3.14.1+dfsg+~3.12.6-2


Thanks
--
╭───────────────────────────────────────────────────╮
│ Mohammed Bilal │
│ 2D65 BC1E B966 5A6E 97F9 730A B3F5 9452 8521 9E1F │
╰───────────────────────────────────────────────────╯
OpenPGP_signature

Pirate Praveen

unread,
Sep 3, 2022, 2:00:04 PM9/3/22
to


On Sat, Sep 3 2022 at 09:44:22 PM +05:30:00 +05:30:00, Pirate Praveen
<pra...@onenetbeyond.org> wrote:
> I tried different babel options but none of them seems to be working
> for optional chaining operator transpiling. I tried target node 12
> for babel preset env, tried explicitly adding this plugin for
> optional chaining operator etc (by patching config/babel.config.js -
> adding top level preset as well as adding to overrides).

I succeeded in correctly transpiling node-yaml for node12 by using
babeljs commandline, so this buys us more time to backport nodejs for
gitlab.

https://salsa.debian.org/js-team/node-yaml/-/commit/cca188ba053175258e78f4afdf68f2cc80953d11

Looks like config/babel.config.js was never actually being used as
babel.config.js should be in the root directory along with package.json

Mohd Bilal

unread,
Nov 26, 2022, 11:01:27 AM11/26/22
to
On Tue, 31 May 2022 07:05:00 +0000 Eerste Laatste <hoek...@hotmail.com>
wrote:

> Would it be possible to have a backports version of nodejs for Bullseye?
> I am running into problems for example with logical assignment operators
> that are supported since NodeJS 15.0.0.
>

I made a try rebuilding nodejs for bullseye-backports using backported
build dependencies from
https://people.debian.org/~praveen/fasttrack-staging .

I tried building with the bundled openssl since openssl 3 wasn't
available for bullseye

Currently the build fails with 3 test failures which I'm not able to fix
after countless tries.

not ok 606 parallel/test-dgram-send-cb-quelches-error
---
duration_ms: 11.634
severity: fail
exitcode: 1
stack: |-
node:assert:400
throw err;
^

AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy
value:

assert.ok(err)

at callbackOnly
(/<<PKGBUILDDIR>>/test/parallel/test-dgram-send-cb-quelches-error.js:24:10)
at callbackOnly (/<<PKGBUILDDIR>>/test/common/index.js:437:15)
at process.processTicksAndRejections
(node:internal/process/task_queues:82:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: null,
expected: true,
operator: '=='
}

Node.js v18.7.0
...

not ok 1689 parallel/test-module-loading-globalpaths
---
duration_ms: 2.220
severity: fail
exitcode: 1
stack: |-
node:internal/modules/cjs/loader:959
throw err;
^

Error: Cannot find module 'foo'
Require stack:
- /<<PKGBUILDDIR>>/test/parallel/test-module-loading-globalpaths.js
at Module._resolveFilename
(node:internal/modules/cjs/loader:956:15)
at Module._load (node:internal/modules/cjs/loader:804:27)
at Module.require (node:internal/modules/cjs/loader:1022:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous>
(/<<PKGBUILDDIR>>/test/parallel/test-module-loading-globalpaths.js:15:15)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
at Module._extensions..js
(node:internal/modules/cjs/loader:1174:10)
at Module.load (node:internal/modules/cjs/loader:998:32)
at Module._load (node:internal/modules/cjs/loader:839:12)
at Function.executeUserEntryPoint [as runMain]
(node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/<<PKGBUILDDIR>>/test/parallel/test-module-loading-globalpaths.js'
]
}

Node.js v18.7.0
node:internal/modules/cjs/loader:959

not ok 2035 parallel/test-repl
---
duration_ms: 0.714
severity: fail
exitcode: 1
stack: |-
out: ""
in: ""
out: "message"
in: "'Read, Eval, Print Loop'"

[...]

in: "{ a: 1 }"
out: "{ \"a\": "
in: "... "
out: "1 }"
in: "{ a: 1 }"
out: "class Foo { #private = true "
in: ""
node:internal/process/promises:288
triggerUncaughtException(err, true /* fromPromise */);
^

AssertionError [ERR_ASSERTION]: Expected values to be strictly equal:

'' !== '... '

at runReplTests (/<<PKGBUILDDIR>>/test/parallel/test-repl.js:91:16)
at process.processTicksAndRejections
(node:internal/process/task_queues:95:5)
at async /<<PKGBUILDDIR>>/test/parallel/test-repl.js:830:5 {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: '',
expected: '... ',
operator: 'strictEqual'
}

Node.js v18.7.0


You can find my changes here:

https://salsa.debian.org/rmb/nodejs/-/tree/bullseye-backports
OpenPGP_signature
0 new messages