问题
I love the idea of OpenShift but I want to be able to run a JavaScript task runner on deployment.
I've noticed NPM is available but whenever I try to install my package.json file or npm install grunt, I get the following error:
Please try running this command again as root/Administrator.
Is there a way to get this working on a PHP 5.4 cartridge?
Any help would be greatly appreciated.
回答1:
It should be possible... although it would be rather difficult. The reason is being is because when a cartridge is deployed to a gear, there are config scripts executed to setup things like environment variables, runtime paths, etc. So you'll need to take some of the actions listed in the NodeJs cartridge and put them in a action hook. Once thats all said and done you should be able to get that working.
来源:https://stackoverflow.com/questions/24933020/can-i-run-grunt-gulp-on-my-php-5-4-cartridge