Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,757
Community Members
 
Community Events
176
Community Groups

Facing this issue while running bitbucket pipeline

/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:152:10)
at Module._compile (module.js:605:28)
at Object.Module._extensions..js (module.js:652:10)
at Module.load (module.js:560:32)
at tryModuleLoad (module.js:503:12)
at Function.Module._load (module.js:495:3)
at Module.require (module.js:585:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/opt/atlassian/pipelines/agent/build/node_modules/fs-extra/lib/mkdirs/index.js:3:44)

1 answer

0 votes

Hi @Rohan Rana and welcome to the community!

Could you share some more details regarding this issue, so we can better help you?

  • What command are you executing in Pipelines when you get this error?

  • What is the full output of the command? (please make sure to mask/remove private/sensitive data from the output, if any, prior to sharing)

  • Do you get the same error if you debug the build locally with Docker?

This is a good way to narrow down whether the issue seems to be specific to Pipelines or not.

You can debug this locally the following way:

1. Take a new clone of the repo on your machine (clone the branch where this build is running)

2. Navigate to the directory of that new clone, and do a git reset --hard to the commit of the failed build with the issue (if it's not the last commit)

3. Afterwards, start a Docker container with the following command

docker run -it --volume=/Users/myUserName/code/my-repo:/localDebugRepo --workdir="/localDebugRepo" --memory=4g --memory-swap=4g --memory-swappiness=0 --cpus=4 --entrypoint=/bin/bash python:2.7

Replace /Users/myUserName/code/my-repo in the command with the path of the clone you took on step 1.
Replace python:2.7 in the command with the Docker image that you use to run this build.

4. After the Docker container starts, you can run the commands of the script in your yml file and observe the output.

Do you get the same error in the output?

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events