@frank, I’m doing something similar in my build, but with coffeelint, and I’m having trouble actually running coffeelint after setting up my circle.yml.
How do I invoke the module after setting up circle.yml with the following:
In the case of coffeelint, I believe you can invoke it with the following circle.yml:
test:
pre:
- ./node_modules/.bin/coffeelint
- ./node_modules/coffeelint/bin/coffeelint # this works too
- node node_modules/coffeelint/lib/commandline.js # this works as well
So I think /home/ubuntu/nvm is not correct any more and it actually needs to be /opt/circleci/nodejs/
However, as I specify my node version using the “v6” shorthand, and the directory that gets created is currently 6.9.3, I have no way of referencing that directory name inside my circle.yml file.
It would be great if I could put something in my circle.yml file that uses the installed directory name for node so that I can cache global npm packages.