2014-10-31 6 views
1

Openshift에 Python 2.7 및 Mysql 5.5 카트리지가있는 응용 프로그램이 있으며, 장고 응용 프로그램을 실행하고 싶습니다. 앱을 만들려면 this을 사용했습니다.Openshift Django에서 Bower 사용

로컬에서는 패키지 관리자로 bower를 사용하고 있으므로 django-bower가 설치되어 있으므로 ./manage.py bower install을 만들 수 있습니다. 나는 또한 전 세계적으로 설치되어 있습니다 :

>which bower 
/usr/local/bin/bower 

로컬에서는 모든 것이 잘 작동하며, opensshift에서 배포하려고 할 때 문제가 발생합니다. 나는 정자가 openshift에 설치해야한다는 here 읽었습니다하지만 분명히, 나는 정자가 전 세계적으로 설치하지 않은 :

which: no bower in (/var/lib/openshift/5425aaa0438****47000094/python//virtenv/bin:/var/lib/openshift/5425aaa0438****47000094/python//bin:/opt/rh/python27/root/usr/bin:/bin:/usr/bin:/usr/sbin) 

그래서 내가 실행 설치하려고이 :

export HOME=$OPENSHIFT_REPO_DIR 
cd $HOME 
npm cache clear 
npm cache clean 
npm install bower --prefix $OPENSHIFT_REPO_DIR 

그러나 그것을 이 출력과 함께 마지막 명령에서 실패합니다.

npm http GET https://registry.npmjs.org/bower 
npm http 200 https://registry.npmjs.org/bower 
npm http GET https://registry.npmjs.org/bower/-/bower-1.3.12.tgz 
npm http 200 https://registry.npmjs.org/bower/-/bower-1.3.12.tgz 
npm WARN engine [email protected]: wanted: {"node":">=0.10.0"} (current: {"node":"0.6.20","npm":"1.1.37"}) 
çnpm http GET https://registry.npmjs.org/abbrev 
npm http GET https://registry.npmjs.org/archy/0.0.2 
npm http GET https://registry.npmjs.org/bower-config 
npm http GET https://registry.npmjs.org/bower-endpoint-parser 
npm http GET https://registry.npmjs.org/bower-json 
npm http GET https://registry.npmjs.org/bower-logger 
npm http GET https://registry.npmjs.org/bower-registry-client 
npm http GET https://registry.npmjs.org/chalk/0.5.0 
npm http GET https://registry.npmjs.org/cardinal/0.4.0 
npm http GET https://registry.npmjs.org/chmodr/0.1.0 
npm http GET https://registry.npmjs.org/decompress-zip/0.0.8 
npm http GET https://registry.npmjs.org/fstream 
npm http GET https://registry.npmjs.org/fstream-ignore 
npm http GET https://registry.npmjs.org/glob 
npm http GET https://registry.npmjs.org/graceful-fs 
npm http GET https://registry.npmjs.org/handlebars 
npm http GET https://registry.npmjs.org/inquirer/0.7.1 
npm http GET https://registry.npmjs.org/insight/0.4.3 
npm http GET https://registry.npmjs.org/is-root 
npm http GET https://registry.npmjs.org/junk 
npm http GET https://registry.npmjs.org/lockfile 
npm http GET https://registry.npmjs.org/mkdirp/0.5.0 
npm http GET https://registry.npmjs.org/lru-cache 
npm http GET https://registry.npmjs.org/nopt 
npm http GET https://registry.npmjs.org/mout 
npm http GET https://registry.npmjs.org/opn 
npm http GET https://registry.npmjs.org/osenv/0.1.0 
npm http GET https://registry.npmjs.org/p-throttler/0.1.0 
npm http GET https://registry.npmjs.org/promptly/0.2.0 
npm http GET https://registry.npmjs.org/q 
npm http GET https://registry.npmjs.org/request 
npm http GET https://registry.npmjs.org/request-progress/0.3.0 
npm http GET https://registry.npmjs.org/retry/0.6.0 
npm http GET https://registry.npmjs.org/rimraf 
npm http GET https://registry.npmjs.org/semver 
[MORE OF THE SAME] 
npm ERR! Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js' 
npm ERR! { [Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js'] 
npm ERR! errno: 34, 
npm ERR! code: 'ENOENT', 
npm ERR! path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js', 
npm ERR! fstream_finish_call: 'chmod', 
npm ERR! fstream_type: 'File', 
npm ERR! fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js', 
npm ERR! fstream_class: 'FileWriter', 
npm ERR! fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)' ] } 
npm ERR! You may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64 
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/" 
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo 
npm ERR! node -v v0.6.20 
npm ERR! npm -v 1.1.37 
npm ERR! path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js 
npm ERR! fstream_path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! message ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/graceful-fs/polyfills.js' 
npm ERR! errno 34 
npm ERR! fstream_stack Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19) 
npm ERR! 34 errno 
npm ERR! error rolling back Error: ENOTEMPTY, rmdir '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client' 
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client'] 
npm ERR! error rolling back errno: 53, 
npm ERR! error rolling back code: 'ENOTEMPTY', 
npm ERR! error rolling back path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/bower-registry-client' } 
npm ERR! Error: No compatible version found: [email protected]'^1.1.0' 
npm ERR! Valid install targets: 
npm ERR! ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"] 
npm ERR!  at installTargetsError (/usr/lib/node_modules/npm/lib/cache.js:588:10) 
npm ERR!  at /usr/lib/node_modules/npm/lib/cache.js:466:15 
npm ERR!  at saved (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/get.js:136:7) 
npm ERR!  at Object.oncomplete (/usr/lib/node_modules/npm/node_modules/graceful-fs/graceful-fs.js:230:7) 
npm ERR! [Error: No compatible version found: [email protected]'^1.1.0' 
npm ERR! Valid install targets: 
npm ERR! ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"]] 
npm ERR! You may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64 
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/" 
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo 
npm ERR! node -v v0.6.20 
npm ERR! npm -v 1.1.37 
npm ERR! message No compatible version found: [email protected]'^1.1.0' 
npm ERR! message Valid install targets: 
npm ERR! message ["0.1.0","0.1.1","0.1.2","0.2.0","1.0.0","1.1.0"] 
npm ERR! Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js' 
npm ERR! { [Error: ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js'] 
npm ERR! errno: 34, 
npm ERR! code: 'ENOENT', 
npm ERR! path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js', 
npm ERR! fstream_finish_call: 'chmod', 
npm ERR! fstream_type: 'File', 
npm ERR! fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js', 
npm ERR! fstream_class: 'FileWriter', 
npm ERR! fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19)' ] } 
npm ERR! You may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64 
npm ERR! command "node" "/usr/bin/npm" "install" "bower" "--prefix" "/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/" 
npm ERR! cwd /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo 
npm ERR! node -v v0.6.20 
npm ERR! npm -v 1.1.37 
npm ERR! path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js 
npm ERR! fstream_path /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! message ENOENT, chmod '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/rimraf/test/test-sync.js' 
npm ERR! errno 34 
npm ERR! fstream_stack Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19) 
npm ERR! 34 errno 
npm ERR! Error: ENOENT, lstat '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js' 
npm ERR! { [Error: ENOENT, lstat '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js'] 
npm ERR! errno: 34, 
npm ERR! code: 'ENOENT', 
npm ERR! path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js', 
npm ERR! fstream_type: 'File', 
npm ERR! fstream_path: '/var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/node_modules/bower/node_modules/mout/string.js', 
npm ERR! fstream_class: 'FileWriter', 
npm ERR! fstream_stack: [ 'Object.oncomplete (/usr/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26)' ] } 
npm ERR! You may report this log at: 
npm ERR!  <http://github.com/isaacs/npm/issues> 
npm ERR! or email it to: 
npm ERR!  <[email protected]> 

npm ERR! System Linux 2.6.32-431.29.2.el6.x86_64 
[MORE OF THE SAME] 
npm ERR! 34 errno 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /var/lib/openshift/5425aaa04382ec0447000094/app-root/runtime/repo/npm-debug.log 
npm ERR! not ok code undefined 
npm ERR! not ok code 34 

모든 아이디어 ??

감사합니다.

답변

0

ssh를 장비에 넣고 ~/app-root/data/으로 cd 한 다음 npm install bower을 실행하십시오. 나는 문제없이 설치 될 수 있었다 :

npm http 304 https://registry.npmjs.org/es6-symbol 
[email protected] node_modules/bower 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected]) 
├── [email protected] ([email protected], [email protected]) 
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]) 
0
rhc ssh [PROJECT NAME] 
cd nodejs 
npm install bower