You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi, I am trying to publish to chromatic and have added the configs to my bitbucket pipeline but I am getting the following error...
yarn run v1.22.5
error Couldn't find a package.json file in "/opt/atlassian/pipelines/agent/build"
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
My pipeline is below, I have removed the token for the purpose of posting this question. Any advise is welcome.
# 👇 Adds Chromatic as a step
- step:
name: 'Publish to Chromatic'
caches:
- node
script:
- yarn install
# 👇 Runs Chromatic
- yarn chromatic --project-token=XXX
I encountered this error as well trying to Publish to Chromatic from BitBucket. Reviewing the tutorial I was following it looks like I needed to perform the below steps:
npm install --save-dev chromatic
yarn chromatic --project-token=<project-token>
Hi @Shawn Williams and welcome to the community!
I am not familiar with Chromatic, but based on the output you posted here the command is failing because there is no package.json file in the clone directory where the build is running.
Just to give you some context: for every step in your bitbucket-pipelines.yml file, a Docker container starts, your repo is cloned in the directory /opt/atlassian/pipelines/agent/build, then the commands of that step's script are executed, and afterwards the container gets destroyed.
If Chromatic needs a package.json file, you can create this in your repository so that it will be available during the Pipelines builds. I would suggest checking the documentation of the package to see what needs to be configured in the package.json file:
https://classic.yarnpkg.com/en/docs/cli/run
https://yarnpkg.com/package/chromatic
https://www.chromatic.com/docs/cli
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.