Getting Data In

Failed Create Component SplunkUI Yarn Setup

zksvc
Contributor

Hi Everyone,

I encountered an issue while creating a new component for SplunkUI. I have followed the documentation tutorial https://splunkui.splunk.com/Packages/create/CreatingSplunkApps as well as the writings from others here https://blog.scrt.ch/2023/01/03/getting-started-with-splunkui/  but I am facing an error as shown in the image below.

yarn-error.png

My Setup :

node -v v18.19.1
npm -v 9.2.0
npx yarn -v 1.22.22

 

Labels (2)
0 Karma
1 Solution

zksvc
Contributor

Fix the yarn version, install yarn correctly 

sudo npm install -g yarn@1.22.19

zksvc_0-1749785949737.png

 

View solution in original post

0 Karma

zksvc
Contributor

Fix the yarn version, install yarn correctly 

sudo npm install -g yarn@1.22.19

zksvc_0-1749785949737.png

 

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @zksvc 

I believe you were meant to run "yarn run setup" (missing the "run") at this point. 

You might need to run "yarn install" first.

This page is a great first-run tutorial on using @splunk/create too https://splunkui.splunk.com/Toolkits/SUIT/ComponentTutorial

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

0 Karma

zksvc
Contributor

Hi @livehybrid 

Thanks for your reply, when i try to type "yarn run setup" i got error like this. 

zksvc_0-1749713810467.png

What yarn version you use btw ? 

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Hi @zksvc 

I'm on 1.22.19

If you're on 2+ there might be a conflict with the pnp nodeLinker (which I think is default) - so if you're on 2.x you could try creating a .yarnrc.yml file in the project root with:

nodeLinker: node-modules

Out of interest, does this work?

yarn lerna run build

🌟 Did this answer help you? If so, please consider:

  • Adding karma to show it was useful
  • Marking it as the solution if it resolved your issue
  • Commenting if you need any clarification

Your feedback encourages the volunteers in this community to continue contributing

zksvc
Contributor

My bad, the solution is insatll yarn correctly. my yarn is wrong installation

0 Karma

livehybrid
SplunkTrust
SplunkTrust

Thats great, I'm glad you managed to get it resolved.

If my previous reply helped at all then please consider adding karma to the reply. 

Thanks

0 Karma

zksvc
Contributor

Of course @livehybrid Thanks for your comment

0 Karma

zksvc
Contributor

Sorry i was typo, but it still don't work

zksvc_0-1749713957618.png

 

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...