Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana Build Error: SWC module #186

Closed
coleramos425 opened this issue Sep 19, 2023 · 2 comments
Closed

Grafana Build Error: SWC module #186

coleramos425 opened this issue Sep 19, 2023 · 2 comments
Labels
bug Something isn't working Grafana GUI Related to Omniperf's Grafana GUI
Milestone

Comments

@coleramos425
Copy link
Collaborator

coleramos425 commented Sep 19, 2023

Describe the bug
Upon attempting to build Grafana from the newest release, we received

....
ERROR in ./module.ts
Module build failed (from ../node_modules/swc-loader/src/index.js):
Error: failed to handle: base_dir(`./src`) must be absolute. Please ensure that `jsc.baseUrl` is specified correctly. This cannot be deduced by SWC itself because SWC is a transpiler and it does not try to resolve project details. In other works, SWC does not know which directory should be used as a base directory. It can be deduced if `.swcrc` is used, but if not, there are many candidates. e.g. the directory containing `package.json`, or the current working directory. Because of that, the caller (typically the developer of the JavaScript package) should specify it. If you see this error, please report an issue to the package author.

webpack 5.88.2 compiled with 1 error in 5613 ms
�[91merror Command failed with exit code 1.
�[0minfo Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c apt-get update &&     apt-get install -y apt-transport-https software-properties-common  adduser libfontconfig1 wget curl &&     wget https://dl.grafana.com/enterprise/release/grafana-enterprise_8.3.4_amd64.deb &&    dpkg -i grafana-enterprise_8.3.4_amd64.deb &&    echo "deb https://packages.grafana.com/enterprise/deb stable main" | tee -a /etc/apt/sources.list.d/grafana.list &&     echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | tee /etc/apt/sources.list.d/yarn.list &&     apt-get install gnupg &&     wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc -O server-5.0.asc &&    apt-key add server-5.0.asc &&     echo "deb [trusted=yes arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org.list &&     wget -q -O - https://packages.grafana.com/gpg.key | apt-key add - &&     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg > /dev/null &&     apt-get update &&     apt-get install -y mongodb-org                                      &&     apt-get install -y tzdata systemd apt-utils npm vim net-tools  	&&     mkdir -p /nonexistent                                               &&     /usr/sbin/grafana-cli plugins install michaeldmoore-multistat-panel &&     /usr/sbin/grafana-cli plugins install ae3e-plotly-panel             &&     /usr/sbin/grafana-cli plugins install natel-plotly-panel            &&     /usr/sbin/grafana-cli plugins install grafana-image-renderer        &&     curl -fsSL https://deb.nodesource.com/setup_16.x | bash -           &&     apt-get install -y yarn nodejs                                      &&     chown root:grafana /etc/grafana                                     &&     cd /var/lib/grafana/plugins/omniperfData_plugin                       &&     npm install                                                         &&     npm run build                                                       &&     apt-get autoremove -y                                               &&     apt-get autoclean -y                                                &&     cd /var/lib/grafana/plugins/custom-svg                              &&     yarn install                                                        &&     yarn build                                                          &&     yarn autoclean                                                      &&     sed -i "s/  bindIp.*/  bindIp: 0.0.0.0/" /etc/mongod.conf           &&     mkdir -p /var/lib/grafana						&&     touch /var/lib/grafana/grafana.lib					&&     chown grafana:grafana /var/lib/grafana/grafana.lib			&&     rm /app/grafana-enterprise_8.3.4_amd64.deb /app/server-5.0.asc' returned a non-zero code: 1
Service 'web' failed to build : Build failed

Development Environment:

  • Linux Distribution: Ubuntu 22.04
  • Omniperf Version: v1.0.10
  • GPU: Mi250

To Reproduce
Steps to reproduce the behavior:

$ wget https://github.com/AMDResearch/omniperf/releases/download/v1.0.10/omniperf-v1.0.10.tar.gz
$ tar -zxvf <download>
$ sudo docker build

Additional context
See attached log
docker-compose.txt

CC: @jakurzak

@coleramos425 coleramos425 added bug Something isn't working Grafana GUI Related to Omniperf's Grafana GUI labels Sep 19, 2023
@coleramos425
Copy link
Collaborator Author

Credit to @JoseSantosAMD for discovering the issue:

It appears this is related to a known issue with Grafana's @swc/core module bugged in version 1.3.76
https://stackoverflow.com/questions/76884057/grafana-build-a-panel-plugin-from-template-error

We're trying a suggested downgrade to a stable version to fix the issue

coleramos425 added a commit that referenced this issue Sep 19, 2023
@coleramos425 coleramos425 added this to the v1.1.0 milestone Sep 19, 2023
@coleramos425
Copy link
Collaborator Author

We've confirmed this fix with the customer. The patch is available in dev and will be pushed out next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Grafana GUI Related to Omniperf's Grafana GUI
Projects
None yet
Development

No branches or pull requests

1 participant