Repository: prometheus/prometheus (language: go)

Issue:
Build error in master "Failed to parse source map from @nexucis/src/index.ts"
### What did you do?

Cloned the latest version and executing 
make build

### What did you expect to see?

Successful build

### What did you see instead? Under which circumstances?

Darwin X64, nvm version v16.15.0, node v16.15.0, npm version '8.5.5', go version go1.18.1 darwin/amd64
git clone https://github.com/prometheus/prometheus.git
cd prometheus
make build
...
Creating an optimized production build...
Compiled with warnings.

Failed to parse source map from '/Users/oleksiishyshkov/tools/prometheus_src/prometheus/web/ui/node_modules/@nexucis/src/index.ts' file: Error: ENOENT: no such file or directory, open '/Users/oleksiishyshkov/tools/prometheus_src/prometheus/web/ui/node_modules/@nexucis/src/index.ts'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  454.65 kB  build/static/js/main.7fd31b42.js
  52.38 kB   build/static/css/main.faad45b4.css

The project was built assuming it is hosted at ./.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.

Find out more about deployment here:

  https://cra.link/deployment

>> bundling npm licenses
rm -f "npm_licenses.tar.bz2"
find web/ui/node_modules -iname "license*" | tar cfj "npm_licenses.tar.bz2" --transform 's/^/npm_licenses\//' --files-from=-
tar: Option --transform is not supported
Usage:
  List:    tar -tf <archive-filename>
  Extract: tar -xf <archive-filename>
  Create:  tar -cf <archive-filename> [filenames...]
  Help:    tar --help
make: *** [npm_licenses] Error 1

### System information

Darwin X64, nvm version v16.15.0, node v16.15.0, npm version '8.5.5', go version go1.18.1 darwin/amd64

### Prometheus version

```text
Master branch
```


### Prometheus configuration file

_No response_

### Alertmanager version

_No response_

### Alertmanager configuration file

_No response_

### Logs

_No response_


Discussion / hints:
thanks for reporting this issue.

Even if it looks super bad it's actually more a warning than an error. So the build of the UI still work as expected.
That doesn't mean we shouldn't fix it, it's just less urgent
hmm, the @nexucis directory has no src/index.ts

<img width="545" alt="image" src="https://user-images.githubusercontent.com/961094/169066944-4c6982fc-8f80-4bce-9e62-50209d5c03c3.png">

maybe forget to ship it

mmm well it's normal that the `@nexucis` directory doesn't contain any folder `src` since it's not a package.

The packages are [`@nexucis/fuzzy`](https://github.com/Nexucis/fuzzy) and [`@nexucis/kvsearch`](https://github.com/Nexucis/kvsearch). Perhaps there is an issue during the build of these packages. Like the `maps` files are not injected or not well indexed.
But I really don't know what's happening here.
i check the cra has been upgrade to 5.x, see https://github.com/facebook/create-react-app/discussions/11767
this not `@nexucis` 's bug
Thanks @fatelei for the link. That was helpful :)

I read the different comments there and I think I will just remove the source map. That actually makes sense to remove it as I don't have the wish to put the source code in the package.

Fix patch:
diff --git a/web/ui/package-lock.json b/web/ui/package-lock.json
index ab51ad3d7a1..a7d6d74e396 100644
--- a/web/ui/package-lock.json
+++ b/web/ui/package-lock.json
@@ -2964,16 +2964,16 @@
       }
     },
     "node_modules/@nexucis/fuzzy": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/@nexucis/fuzzy/-/fuzzy-0.3.0.tgz",
-      "integrity": "sha512-Z1+ADKY0fxdBE28REraWhUCNy+Bp5UmpK3Tc/5wdCDpY+6fXh8l2csMtbPGaqEBsyGLxJz9wUYGCf+CW9unyvQ=="
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/@nexucis/fuzzy/-/fuzzy-0.4.0.tgz",
+      "integrity": "sha512-VZVzETBXJjFzTd5RmKR+X8V5uM9PKM2yyb7v/aygMF+1iAnZwxzQtxbFx358SNP23eid4s85TIREHw50p8Zugg=="
     },
     "node_modules/@nexucis/kvsearch": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/@nexucis/kvsearch/-/kvsearch-0.6.0.tgz",
-      "integrity": "sha512-sv2WWXUMRMoM2g3y02m4+9MK08l9nposveNqn5sPKSGpgZ0DxvmD84SAJHb0SvVazgL31C85kST2kySpF0+/Dw==",
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/@nexucis/kvsearch/-/kvsearch-0.7.0.tgz",
+      "integrity": "sha512-Zl1u0wUpgpfY1JmHIKyLuqDdN5iTm/wuLXbBbm//Qck/un9ivGYtePpT1/BjG/2XisBsvHb7EldMAuRQaUahtg==",
       "dependencies": {
-        "@nexucis/fuzzy": "^0.3.0"
+        "@nexucis/fuzzy": "^0.4.0"
       }
     },
     "node_modules/@nodelib/fs.scandir": {
@@ -17331,8 +17331,8 @@
         "@fortawesome/fontawesome-svg-core": "6.1.1",
         "@fortawesome/free-solid-svg-icons": "6.1.1",
         "@fortawesome/react-fontawesome": "0.1.17",
-        "@nexucis/fuzzy": "^0.3.0",
-        "@nexucis/kvsearch": "^0.6.0",
+        "@nexucis/fuzzy": "^0.4.0",
+        "@nexucis/kvsearch": "^0.7.0",
         "bootstrap": "^4.6.1",
         "codemirror-promql": "0.19.0",
         "css.escape": "^1.5.1",
@@ -19496,16 +19496,16 @@
       }
     },
     "@nexucis/fuzzy": {
-      "version": "0.3.0",
-      "resolved": "https://registry.npmjs.org/@nexucis/fuzzy/-/fuzzy-0.3.0.tgz",
-      "integrity": "sha512-Z1+ADKY0fxdBE28REraWhUCNy+Bp5UmpK3Tc/5wdCDpY+6fXh8l2csMtbPGaqEBsyGLxJz9wUYGCf+CW9unyvQ=="
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/@nexucis/fuzzy/-/fuzzy-0.4.0.tgz",
+      "integrity": "sha512-VZVzETBXJjFzTd5RmKR+X8V5uM9PKM2yyb7v/aygMF+1iAnZwxzQtxbFx358SNP23eid4s85TIREHw50p8Zugg=="
     },
     "@nexucis/kvsearch": {
-      "version": "0.6.0",
-      "resolved": "https://registry.npmjs.org/@nexucis/kvsearch/-/kvsearch-0.6.0.tgz",
-      "integrity": "sha512-sv2WWXUMRMoM2g3y02m4+9MK08l9nposveNqn5sPKSGpgZ0DxvmD84SAJHb0SvVazgL31C85kST2kySpF0+/Dw==",
+      "version": "0.7.0",
+      "resolved": "https://registry.npmjs.org/@nexucis/kvsearch/-/kvsearch-0.7.0.tgz",
+      "integrity": "sha512-Zl1u0wUpgpfY1JmHIKyLuqDdN5iTm/wuLXbBbm//Qck/un9ivGYtePpT1/BjG/2XisBsvHb7EldMAuRQaUahtg==",
       "requires": {
-        "@nexucis/fuzzy": "^0.3.0"
+        "@nexucis/fuzzy": "^0.4.0"
       }
     },
     "@nodelib/fs.scandir": {
@@ -23951,8 +23951,8 @@
         "@fortawesome/fontawesome-svg-core": "6.1.1",
         "@fortawesome/free-solid-svg-icons": "6.1.1",
         "@fortawesome/react-fontawesome": "0.1.17",
-        "@nexucis/fuzzy": "^0.3.0",
-        "@nexucis/kvsearch": "^0.6.0",
+        "@nexucis/fuzzy": "^0.4.0",
+        "@nexucis/kvsearch": "^0.7.0",
         "@testing-library/react-hooks": "^7.0.1",
         "@types/enzyme": "^3.10.10",
         "@types/flot": "0.0.32",
diff --git a/web/ui/react-app/package.json b/web/ui/react-app/package.json
index 1a526d0e49a..ee2dc8ed772 100644
--- a/web/ui/react-app/package.json
+++ b/web/ui/react-app/package.json
@@ -19,8 +19,8 @@
     "@fortawesome/fontawesome-svg-core": "6.1.1",
     "@fortawesome/free-solid-svg-icons": "6.1.1",
     "@fortawesome/react-fontawesome": "0.1.17",
-    "@nexucis/fuzzy": "^0.3.0",
-    "@nexucis/kvsearch": "^0.6.0",
+    "@nexucis/fuzzy": "^0.4.0",
+    "@nexucis/kvsearch": "^0.7.0",
     "bootstrap": "^4.6.1",
     "codemirror-promql": "0.19.0",
     "css.escape": "^1.5.1",


Test patch: