Использование Bower в Openshift Django

У меня есть приложение в Openshift с картриджами Python 2.7 и Mysql 5.5, я хочу запустить на нем приложение Django. Я использовал это, чтобы начать создание приложения.

На локальном компьютере я использую Bower в качестве менеджера пакетов, поэтому у меня установлен django-bower, поэтому я могу сделать ./manage.py bower install. Я также установил Bower по всему миру:

>which bower
/usr/local/bin/bower

На локальном все работает нормально, проблемы возникают при попытке развернуть в openshift. Я прочитал здесь, что Bower должен быть установлен в openshift но, видимо, у меня не установлен Bower глобально:

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: ansi-styles@'^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: ansi-styles@'^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: ansi-styles@'^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

Любые идеи??

Спасибо.


person mario595    schedule 31.10.2014    source источник


Ответы (1)


ssh в свое снаряжение и перейдите к ~/app-root/data/, а затем запустите 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])
person niharvey    schedule 10.11.2014