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

Facing this issue while running bitbucket pipeline

Rohan Rana March 14, 2022
/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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 16, 2022

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
AUG Leaders

Atlassian Community Events