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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Problem with pipelines on /opt/atlassian/pipelines/agent/build/node_modules/mkdirp/index.js:4

My pipeline has been running smoothly for a long time, but on March 21 it started failing with no code change on my side.

I'm using the image maven:3.3.9 for the pipeline which is just running mvn -B package with frontend-maven-plugin for minifying and versioning assets (https://github.com/eirslett/frontend-maven-plugin). 

The error I'm getting is at the execution of that plugin:

[INFO] --- frontend-maven-plugin:1.0:grunt (grunt build) @ ... ---[INFO] Running 'grunt build' in /opt/atlassian/pipelines/agent/build[ERROR] /opt/atlassian/pipelines/agent/build/node_modules/mkdirp/index.js:4[ERROR] const {mkdirpNative, mkdirpNativeSync} = require('./lib/mkdirp-native.js')[ERROR] ^[ERROR] [ERROR] SyntaxError: Unexpected token {[ERROR] at exports.runInThisContext (vm.js:53:16)

Locally, it works fine with maven 3.6.0, so I tried to upgrade the image to maven:3.6-jdk-8 with no success. 

Have someone else faced this problem?

2 answers

1 accepted

0 votes
Answer accepted

And it was a dependency issue from node (used by the plugin):

- "grunt": "^1.0.1",
+ "grunt": "1.0.4",

Forcing the previous version of grunt solved it.

Ok, comparing last successful execution with the first one that failed, I noticed that grunt dependency changed from grunt@1.0.4 to grunt@1.1.0

And mkdirp@0.5.1 updated to mkdirp@1.0.3 which is inherited from that version of grunt.

I also noticed Cache "maven": Not found in the errored build.

Now I'll try to check why since grunt comes as a dependency of frontend-maven-plugin.

I'll update if I manage to find the solution

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

455 views 4 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you