Bug 259559

Summary: security/greenbone-security-assistant
Product: Ports & Packages Reporter: ddrinnon
Component: Individual Port(s)Assignee: Jose Alonso Cardenas Marquez <acm>
Status: Closed Overcome By Events    
Severity: Affects Only Me CC: Trond.Endrestol, ddrinnon
Priority: --- Flags: bugzilla: maintainer-feedback? (acm)
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
Patch for security/greenbone-security-assistant/Makefile making the port depend on www/node16 none

Description ddrinnon 2021-10-30 19:41:36 UTC
security/greenbone-security-assistant fails to build on FreeBSD_12.2-RELEASE with Poudriere:

....
$ /wrkdirs/usr/ports/security/greenbone-security-assistant/work/gsa-21.4.2/gsa/node_modules/.bin/react-scripts build
node:internal/modules/cjs/loader:488
      throw e;
      ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/tokenize' is not defined by "exports" in /wrkdirs/usr/ports/security/greenbone-security-assistant/work/gsa-21.4.2/gsa/node_modules/postcss-safe-parser/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:416:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:669:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/wrkdirs/usr/ports/security/greenbone-security-assistant/work/gsa-21.4.2/gsa/node_modules/postcss-safe-parser/lib/safe-parser.js:1:17) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v17.0.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ninja: build stopped: subcommand failed.
*** Error code 1

Stop.
make: stopped in /usr/ports/security/greenbone-security-assistant
....
Comment 1 Trond Endrestøl 2021-11-01 16:04:04 UTC
Created attachment 229201 [details]
Patch for security/greenbone-security-assistant/Makefile making the port depend on www/node16

In addition, www/yarn should be configured to depend on www/node16.
Comment 2 Jose Alonso Cardenas Marquez freebsd_committer freebsd_triage 2021-11-05 16:40:35 UTC
Hi, I justt update gvm ports to latest version. Look it at

https://cgit.freebsd.org/ports/commit/?id=77f5aa5d324bbd3771bda67e493cfa6ca55337f7

It should compile without problems (just wait for yarn-cache hosted at my account finish to replicate to another mirrors). Please ,tell me if index.html file from security/greenbone-security-assistant port is being generated correctly (no inline function into this file).