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

something did not work in @grafana/create-plugin@latest(5.9 I believe) #1318

Closed
morpinma-wing opened this issue Nov 12, 2024 · 2 comments · Fixed by #1319
Closed

something did not work in @grafana/create-plugin@latest(5.9 I believe) #1318

morpinma-wing opened this issue Nov 12, 2024 · 2 comments · Fixed by #1319
Assignees
Labels
released This issue/pull request has been released. type/bug Something isn't working

Comments

@morpinma-wing
Copy link

I tried to run that command and it gave me error message

✔ Select a plugin type · panel
✔ Enter a name for your plugin · safas
✔ Enter your organization name (usually your Grafana Cloud org) · xxx

✔︎ Scaffolded xxx-asfa-panel panel plugin
✔︎ Added basic E2E test (Playwright)
✔︎ Set up provisioning for basic dashboard and TestData data source instance
✔︎ Configured development environment (Docker)
✔︎ Added default GitHub actions for CI, releases and Grafana compatibility

file:///Users/xxx/.npm/npx/c8ca622b04c0c218/node_modules/marked-terminal/index.js:474
return text.replace(/:([A-Za-z0-9
-+]+?):/g, function (emojiString) {
^

TypeError: text.replace is not a function
Please report this to https://github.com/markedjs/marked.
at Renderer.insertEmojis [as emoji] (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/marked-terminal/index.js:474:15)
at Renderer.transform (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/marked-terminal/index.js:529:24)
at Renderer.heading (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/marked-terminal/index.js:96:15)
at extension.renderer. (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/marked-terminal/index.js:264:23)
at renderer. [as heading] (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/node_modules/marked/lib/marked.esm.js:2261:48)
at _Parser.parse (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/node_modules/marked/lib/marked.esm.js:1947:42)
at parse (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/node_modules/marked/lib/marked.esm.js:1911:23)
at Marked.parse (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/node_modules/marked/lib/marked.esm.js:2405:28)
at marked (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/node_modules/marked/lib/marked.esm.js:2439:27)
at displayAsMarkdown (file:///Users/xxx/.npm/_npx/c8ca622b04c0c218/node_modules/@grafana/create-plugin/dist/utils/utils.console.js:11:12)

Node.js v20.14.0

I then tried to npx @grafana/[email protected], which worked.

% npx @grafana/[email protected]
Need to install the following packages:
@grafana/[email protected]
Ok to proceed? (y) y

✔ Select a plugin type · panel
✔ Enter a name for your plugin · tst
✔ Enter your organization name (usually your Grafana Cloud org) · lhj

✔︎ Scaffolded lhj-tst-panel panel plugin
✔︎ Added basic E2E test (Playwright)
✔︎ Set up provisioning for basic dashboard and TestData data source instance
✔︎ Configured development environment (Docker)
✔︎ Added default GitHub actions for CI, releases and Grafana compatibility

Congratulations on scaffolding a Grafana panel plugin! 🚀

What's next?

Run the following commands to get started:

* cd ./lhj-tst-panel
* npm install to install frontend dependencies.
* npm exec playwright install chromium to install e2e test dependencies.
* npm run dev to build (and watch) the plugin frontend code.
* docker compose up to start a grafana development server.
* Open http://localhost:3000 in your browser to create a dashboard to begin developing your plugin.

Note: We strongly recommend creating a new Git repository by running git init in ./lhj-tst-panel before continuing.

* Learn more about Grafana Plugin Development at https://grafana.com/developers/plugin-tools

so I think there might be something wrong with the latest patch?

@jackw
Copy link
Collaborator

jackw commented Nov 12, 2024

@morpinma-wing Many thanks for raising this issue. May I ask in future if you find a bug to please report it using our bug issue template which gathers all the information we require up front.

I've managed to reproduce the issue and I've opened #1319 which should fix things.

@jackw jackw moved this from 📬 Triage to 🧑‍💻 In development in Plugins Platform / Grafana Community Nov 12, 2024
@github-project-automation github-project-automation bot moved this from 🧑‍💻 In development to 🚀 Shipped in Plugins Platform / Grafana Community Nov 12, 2024
@grafana-plugins-platform-bot
Copy link

🚀 Issue was released in @grafana/[email protected] 🚀

@grafana-plugins-platform-bot grafana-plugins-platform-bot bot added the released This issue/pull request has been released. label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released. type/bug Something isn't working
Projects
Development

Successfully merging a pull request may close this issue.

2 participants