2013-07-31 5 views
5

My JenkinsはCentOS 6で実行しており、node.js 0.10.15bower 1.0.3です。JenkinsなどのCI環境でBowerを実行する

私は次のことを実行したシェルタスクを持っている:

npm install 
bower install 
grunt clean package 

建物ときバウアーのインストールが失敗します。

+ bower install 

path.js:360 
     throw new TypeError('Arguments to path.join must be strings'); 
      ^
TypeError: Arguments to path.join must be strings 
    at path.js:360:15 
    at Array.filter (native) 
    at Object.exports.join (path.js:358:36) 
    at Object.<anonymous> (/usr/lib/node_modules/bower/node_modules/ 
          update-notifier/node_modules/configstore/configstore.js:9:7) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 
    at Module.load (module.js:356:32) 
    at Function.Module._load (module.js:312:12) 
    at Module.require (module.js:364:17) 
    at require (module.js:380:17) 

Build step 'Execute shell' marked build as failure 

私は、端末しばらくbower installを実行していジェンキンスとしてログインユーザー、それは動作します。その他のコマンドは期待通りに機能します(npmgrunt)。

アイデア?

答えて

4

実行環境には、環境変数として$XDG_CONFIG_HOME$HOMEが設定されていないようです。あなたはそれを手動で設定することでこの問題を回避することができます

、例えば、現在のワークスペースへ:

export XDG_CONFIG_HOME="$WORKSPACE/.config" 
... 
bower install 
+1

私はジェンキンスでHOME環境変数をsettedし、それが機能するようになりました、ありがとうございます。 Githubのこの問題へのリンク:https://github.com/yeoman/configstore/pull/7 – Sebastien

関連する問題