Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Add .npm folder to home directory for jbossews-2.0 cartridge #4774

Open
ravikiran438 opened this issue Feb 14, 2014 · 1 comment
Open

Add .npm folder to home directory for jbossews-2.0 cartridge #4774

ravikiran438 opened this issue Feb 14, 2014 · 1 comment

Comments

@ravikiran438
Copy link

The below script can be used

npm keeps per-user config in ~/.npmrc and cache in ~/.npm/ and Create files/directories, change ownership and SELinux file security context.

touch "$OPENSHIFT_HOMEDIR"/.npmrc
mkdir "$OPENSHIFT_HOMEDIR"/.npm
chown $OPENSHIFT_APP_UUID.$OPENSHIFT_APP_UUID -R "$OPENSHIFT_HOMEDIR"/.npm "$OPENSHIFT_HOMEDIR"/.npmrc
npm config set tmp $OPENSHIFT_TMP_DIR

We need this for using yeoman-maven-plugin

Tried npm config set cache $OPENSHIFT_DATA_DIR/.npm, to change the cache location but it requires atleast .npmrc file in home directory.

@prestonvanloon
Copy link

Is there anyway around this at the moment? I cannot get npm to run on deployment.

Thanks

EDIT:
I set these variables with rhc and I was able to run npm in my build step!

NPM_CONFIG_CACHE=/app-root/build-dependencies/.npm
NPM_CONFIG_USERCONFIG=
/app-root/build-dependencies/.npmrc

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants