Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Grunticon & TravisCI

We are running into an issue when Grunticon is being installed into our Rails 4 engine on TravisCI. I'd appreciate any ideas on:

  • Making the path shorter for installing Grunticon in Rails
  • A way for TravisCI to skip installing Grunticon during our builds (we don't need it for testing)
  • A way to upgrade npm on TravisCI (rumor has it that npm v3 may solve this)

Error from Travis:

    Gem::Package::TooLongFileName: File "node_modules/grunt-grunticon/node_modules/grunticon-lib/node_modules/directory-colorfy/node_modules/phantomjs/node_modules/fs-extra/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/Makefile" has a too long path (should be 256 or less)
    An error occurred while installing trusty-convoy-extension (0.0.3), and Bundler
    cannot continue.

    Make sure that `gem install trusty-convoy-extension -v '0.0.3'` succeeds before
    bundling.

    The command "eval bundle install --jobs=3 --retry=3 --deployment --path=${BUNDLE_PATH:-vendor/bundle}" failed. Retrying, 2 of 3.

Grunticon is installed using a Gruntfile.js in our root directory. That triggers scripts in a node_modules directory. We followed this guide: https://github.com/filamentgroup/grunticon

Thanks!

Update: Successfully installed npm 3 on TravisCI.

before_install:
  - npm install -g [email protected]

Sadly, did not fix the issue.

like image 362
Brit200313 Avatar asked Aug 31 '15 20:08

Brit200313


1 Answers

In your Travis preinstall..

npm i -g npm@3

Npm 3 is in late beta, and will give you a much more flat directory structure.

Note: you will need to add any peer dependencies to your package.json

like image 176
Tracker1 Avatar answered Nov 09 '22 10:11

Tracker1