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

Bootstrapped Front-End Build Fails on Linux for node > 18 #473

Open
IfSentient opened this issue Nov 8, 2024 · 1 comment · May be fixed by #491
Open

Bootstrapped Front-End Build Fails on Linux for node > 18 #473

IfSentient opened this issue Nov 8, 2024 · 1 comment · May be fixed by #491
Assignees

Comments

@IfSentient
Copy link
Collaborator

IfSentient commented Nov 8, 2024

When building the front-end generated by grafana-app-sdk project component add frontend on linux with a node version > 18, the following error is encountered:

$ yarn build
[webpack-cli] TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at exports.prepare (/home/apond/test/issue-tracker-project/plugin/.yarn/cache/rechoir-npm-0.8.0-fb660b3bc8-ad3caed8af.zip/node_modules/rechoir/index.js:21:14)
    at loadConfigByPath (/home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:1377:29)
    at /home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:1460:88
    at Array.map (<anonymous>)
    at WebpackCLI.loadConfig (/home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:1460:68)
    at WebpackCLI.createCompiler (/home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:1781:33)
    at WebpackCLI.runWebpack (/home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:1877:31)
    at Command.<anonymous> (/home/apond/test/issue-tracker-project/plugin/.yarn/__virtual__/webpack-cli-virtual-cc63e22c35/0/cache/webpack-cli-npm-5.1.4-7be5b53b38-3a4ad0d034.zip/node_modules/webpack-cli/lib/webpack-cli.js:944:32)
    at Command.listener [as _actionHandler] (/home/apond/test/issue-tracker-project/plugin/.yarn/cache/commander-npm-10.0.1-f17613b72b-436901d64a.zip/node_modules/commander/lib/command.js:482:17)

This issue does not occur on mac. The current front-end from npx @grafana/create-plugin@latest has departed somewhat significantly from the snapshot in grafana-app-sdk (notably, it no longer uses yarn as the package manager). grafana-app-sdk should update the snapshot used, if possible it would be nice to use @grafana/create-plugin@latest, if this could be run without requiring the interactivity it currently has.

The workaround for current users is to use node 18 to build the project if on linux.

@IfSentient IfSentient self-assigned this Nov 8, 2024
@macabu
Copy link

macabu commented Nov 18, 2024

I could also reproduce the issue on macOS, couldn't get it to work with neither Node 20 nor 22, only 18 worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants