Getting Data In

Failed Create Component SplunkUI Yarn Setup

zksvc
Communicator

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
Communicator

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
Communicator

Fix the yarn version, install yarn correctly 

sudo npm install -g yarn@1.22.19

zksvc_0-1749785949737.png

 

0 Karma

livehybrid
Super Champion

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
Communicator

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
Super Champion

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
Communicator

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

0 Karma

livehybrid
Super Champion

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
Communicator

Of course @livehybrid Thanks for your comment

0 Karma

zksvc
Communicator

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

zksvc_0-1749713957618.png

 

0 Karma
Get Updates on the Splunk Community!

Splunk Answers Content Calendar, July Edition I

Hello Community! Welcome to another month of Community Content Calendar series! For the month of July, we will ...

Secure Your Future: Mastering Upgrade Readiness for Splunk 10

Spotlight: The Splunk Health Assistant Add-On  The Splunk Health Assistant Add-On is your ultimate companion ...

Observability Unlocked: Kubernetes & Cloud Monitoring with Splunk IM

Ready to master Kubernetes and cloud monitoring like the pros? Join Splunk’s Growth Engineering team on ...