Successful build is now failing when trying to rebuild it


#1

This is weird, when I try to re-build the exact same successful build, it fails.

Seems like it can’t find the grunt package anymore.
Getting this error.

grunt build-dev

    bash: line 1: grunt: command not found grunt build-dev returned exit code 127

It seems to run the npm install fine but for some reason, it looks like it can’t find any dependencies anymore. When I tried to debug via SSH, I manage to run Grunt task by hitting the package directly ./node_modules/.bin/grunt but then the app would not run cause it wasn’t finding the CoffeeScript package.

This is really weird cause like I said, I’m rebuilding a build that was successful. Nothing should have change.

Any help is welcome.

Thanks


#2

It could be that the grunt package was installed previously, than its installation step was removed from circle.yml but the package was still present in the cache. Therefore rebuilding without cache could have caused this.

Could you please try installing grunt during your build? Something like this should do it:

dependencies:
  pre:
    - npm install grunt-cli

#3

Thanks Alexey!

the circle.yml didn’t change. So I’m not clear on what caused that.
However changing
dependencies: override: - npm install

for
pre: - npm install

Fixed it.

So thanks


#4