[Pkg-javascript-devel] Bug#1012162: nodejs: Backports version for Bullseye
Pirate Praveen
praveen at onenetbeyond.org
Sat Sep 3 17:14:22 BST 2022
On Tue, 31 May 2022 07:05:00 +0000 Eerste Laatste
<hoekbank at 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).
More information about the Pkg-javascript-devel
mailing list