2016-06-02 21 views
0

Bereitstellen einer SailsJS App zu OpenshiftLoading "bower_task.js" Aufgaben ... ERROR, Fehler: EACCES, Zugriff verweigert .local

Bereitstellen w/git push

remote: ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
remote: ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected] 
remote: ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
remote: ├── [email protected] 
remote: ├── [email protected] ([email protected], [email protected], [email protected]) 
remote: ├── [email protected] ([email protected], [email protected], [email protected]) 
remote: ├── [email protected] ([email protected], [email protected]) 
remote: ├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
remote: └── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
remote: npm info ok 
remote: Preparing build for deployment 
remote: Deployment id is bf24b845 
remote: Activating deployment 
remote: Loading "bower_task.js" tasks...ERROR 
remote: >> Error: EACCES, permission denied '/var/lib/openshift/574f48527628e1bce8000273/.local' 
remote: Warning: Task "bower:install" not found. Use --force to continue. 
remote: 
remote: Aborted due to warnings. 
remote: ------------------------- 
remote: Git Post-Receive Result: failure 
remote: Activation status: failure 
remote: Activation failed for the following gears: 
remote: 574f48527628e1bce8000273 (Error activating gear: CLIENT_ERROR: Failed to execute: 'control start' for /var/lib/openshift/574f48527628e1bce8000273/nodejs 
remote: #<IO:0x0000000069e290> 
remote: #<IO:0x0000000069e218> 
remote:) 
remote: Deployment completed with status: failure 
remote: postreceive failed 
To ssh://[email protected]/~/git/webrtc.git 
    df77e95..dc8b186 HEAD -> master 

Irgendwelche Ideen Wie behebt man das?

UPDATE

Aktionshaken hinzufügen. Empfohlene in this thread

cd .openshift/action_hooks 

Ich habe den Code in meinem bestehenden Aktion Haken hinzugefügt pre_start_nodejs

#!/bin/bash 
export NODE_ENV=production 

if [ ! -d $OPENSHIFT_NODEJS_DIR/node_modules/bower ] 
then 
    cd $OPENSHIFT_NODEJS_DIR 
    npm install bower 
fi 

cd $OPENSHIFT_HOMEDIR/app-root/repo 
HOME=$OPENSHIFT_REPO_DIR bower install 
cd $OPENSHIFT_HOMEDIR 

if [ -f "${OPENSHIFT_REPO_DIR}"/Gruntfile.js ]; then 
    (cd "${OPENSHIFT_REPO_DIR}"; node_modules/grunt-cli/bin/grunt prod) 
fi 

Das half mir nach vorne zu bewegen, aber ich bin immer noch mit Error: EACCES, permission denied-.local

UPDATE 2 stecken

In package.json, hinzugefügt

"build": "HOME=$HOME/app-root/runtime bower install --config.interactive=false && grunt build", 

aber nicht helfen, entweder

UPDATE 3

1 - rhc ssh proyectname 
2 - cd nodejs 
3 - npm install bower 
4 - cd .. 
5 - export HOME=$HOME/app-root/runtime/repo 
6 - cd app-root/repo 
7 - bower install 

nicht

aufgelöst hat

ich aus Ideen bin.

Ich verstehe, dass bower keinen Zugang zu .local hat, aber nicht wissen, wie

zu lösen

Antwort

0

Diese vgl half Source

EACCESS, permission denied '/var/lib/openshift/[instance-id]/.local' 

Die Fehlermeldung bedeutet, dass Sie die Erlaubnis nicht den Home-Ordner zu schreiben.

Hinzugefügt diese in package.json

"scripts": { 
    "postinstall": "export HOME=/var/lib/openshift/574fce8000273/app-root/runtime/repo; ./node_modules/bower/bin/bower install", <======== 
    "debug": "node debug app.js", 
    "start": "node app.js" 
    }, 

und Bower abgeschlossene Installation