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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...