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

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

gastonfournier April 5, 2020

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
gastonfournier April 5, 2020

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.

0 votes
gastonfournier April 5, 2020

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

Atlassian Community Events