Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 843419 - net-analyzer/gsa-21.4.4 fails to compile: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath tokenize is not defined by "exports" in package.json
Summary: net-analyzer/gsa-21.4.4 fails to compile: Error [ERR_PACKAGE_PATH_NOT_EXPORTE...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: jonas.licht
Depends on:
Reported: 2022-05-09 13:15 UTC by Agostino Sarubbo
Modified: 2023-05-12 07:44 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---

build.log (build.log,42.12 KB, text/plain)
2022-05-09 13:15 UTC, Agostino Sarubbo

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2022-05-09 13:15:51 UTC

Issue: net-analyzer/gsa-21.4.4 fails to compile.
Discovered on: amd64 (internal ref: ci)
Comment 1 Agostino Sarubbo gentoo-dev 2022-05-09 13:15:53 UTC
Created attachment 777767 [details]

build log and emerge --info
Comment 2 satmd 2022-05-09 22:49:31 UTC
We seem to be running into

Upstream suggests the supported configuration uses nodejs 10, while others say they're getting the problem since nodejs 15 (where the deprecation notice pops up first)

The internet lists several workarounds.
- Adding "./*": "./*" => Not tried myself, but at least one reply that this breaks other parts
- Downgrading to nodejs 14 (oldest major version in gentoo portage) => Trying this right now
- "yarn upgrade" => Build completes, but the Content-Security-Policy now needs "unsafe-eval" for script sources => Stopped right there, this seems to be the wrong track (until upstream fixes their dependencies)
Comment 3 satmd 2022-05-09 23:35:38 UTC
I have no idea why, but while waiting for nodejs 14 to compile, the web ui started working.

I'm now running nodejs 18 with latest gsa, which was build with a manual "yarn upgrade" between unpack and prepare stages. I cancelled the nodejs downgrade build.
Comment 4 satmd 2022-05-09 23:36:54 UTC
This is the required settings for Content-Security-Policy to work (/etc/conf.d/gsad).

GSAD_OPTIONS="--no-redirect --timeout=14400 --http-csp=\"default-src 'none'; object-src 'none'; base-uri 'none'; connect-src 'self'; script-src 'self' 'unsafe-eval'; frame-ancestors 'none'; form-action 'self'; style-src-elem 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' blob:;\""
Comment 5 Elleni 2023-04-11 10:05:55 UTC
I also hit this error. Build log:

Masking current stable net-libs/nodejs-18.14.2 and downgrading to the last stable version (16.19.1) let gsa compile successfully.