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

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

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

Task grunt not found. Edited

I've been trying to get a bamboo project started that utilizes grunt, but have been unable to get a successful run. I've tried to strip it down to just the basics after failing with the full build and same results. 

If there's a 'hello world' example I can start over with I can try that to see if it's our server configuration or something different that I need to investigate. 

Bamboo Stage Steps

  1. Source Code Checkout from Bitbucket... which contains package.json in it's root
  2. NPM Task (node v7.7.4): install
    Log Result: npm WARN grunt-git@1.0.3 requires a peer of grunt@~1.0.1 but none was installed.
    Finished task 'NPM Install Package.json' with result: Success
  3. Grunt Task: grunt js
    Warning: Task "grunt" not found. Use --force to continue.

I've tried a few different approaches... adding specific npm steps to install grunt-cli and grunt specifically before doing npm install. I've also reduced my package.json to only include the dependencies for grunt/cli and removed everything else... just to see if I can get it to install correctly. 

Package JSON file (relevant portions)

"engines": {
        "node": ">= 0.10.13"
    },
    "dependencies" : {
        "grunt": "~0.4",
        "grunt-cli": "~0.1"
    }

As far as I can tell I'm following everything outlined on https://confluence.atlassian.com/bamboo/getting-started-with-node-js-and-bamboo-687213472.html but continue to fail basic build. If there's anything else I can provide to help guide me, let me know. 

1 answer

1 accepted

0 votes
Answer accepted

I was able to work around this with a bunch of trial and error, but wound up with the following package.json and steps. 

Build Steps

  1. Source Code Checkout from Bitbucket... which contains package.json in it's root
  2. NPM: install -g npm
  3. NPM: install
  4. grunt (0.4.x): js (js is the task name in gruntfile.js)

package.json

I wound up removing the engines section and added grunt-contrib-requirejs which seemed to clear up the error. On my local machine I had run 'npm install grunt --save-dev', 'npm install grunt-cli --save-dev' and 'npm install grunt-contrib-requirejs --save-dev' to get the versions. At one point I also added those same commands in the bamboo config, so overall I'm not sure what exactly did the trick - but was able to clone the build and it worked from the start with this latest setup. 

},
  "devDependencies": {
    "grunt": "~1.0.1",
    "grunt-cli": "~1.2.0",
    "grunt-contrib-requirejs": "~1.0.0"
  }

Suggest an answer

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

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

696 views 1 6
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