I'm contributing to two projects that both require different versions of Grunt:
Both projects have separate workspaces.
I currently have Grunt v0.4.1 installed on my machine; however I can't seem to run grunt on Project A since it detects the gruntfile differently. I could migrate Project A from grunt v0.3->0.4, however I feel there could be a better solution out there in the meantime.
How would I go about solving this conflict?
Installing a specific version If you need a specific version of Grunt or a Grunt plugin, run npm install grunt@VERSION --save-dev where VERSION is the version you need. This will install the specified version, adding it to your package.
grunt. util. _ is deprecated and we highly encourage you to npm install lodash and var _ = require('lodash') to use lodash .
The Grunt community is still going strong and both tools look like they're going to be around for a while yet. I should mention that another up and coming alternative to task runners like Grunt and Gulp is simply using npm scripts with command-line tools.
Grunt 0.3 used to require a global install, but with 0.4 you install the cli globally (npm install grunt-cli
). This should still work with 0.3 if you install the cli globally, and then the 0.3 version locally (like 0.4 does).
So to summarize:
npm uninstall grunt -g
to remove the old global grunt versionnpm install grunt-cli -g
ensure the cli is installed globally npm install [email protected]
into your your 0.3 projectIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With