ソースを参照

Fixed npm i errors

master^2
guest 3年前
コミット
303892fc61
1個のファイルの変更14行の追加8行の削除
  1. 14
    8
      index.js

+ 14
- 8
index.js ファイルの表示

@@ -1321,8 +1321,10 @@ var op = {

return any(tasks).then(() => {

gitRepos.push('chess-server-lib/server');
gitRepos.push({ repo : 'chess-server-lib/server'});
gitRepos = gitRepos.concat(elevatedRunasRepos);
// console.dir(gitRepos)
// throw ""

// gitRepos = [
// // 'bbhverse', 'serververse', 'elixir-server',
@@ -1365,7 +1367,7 @@ var op = {
}
})

// NODE_ENV=development DEBUG=loopback:connector:mssql node --tls-min-v1.0 --inspect elixir/server.js
// PB : NOTE -- npm i for client does not complete when NODE_ENV=production
// therefore bower doesn't get installed !!! which then fails installing the bower dependenciew !!!
// We work around this by running npm i for client without any NODE_ENV which probably defualts to development.
@@ -1386,8 +1388,9 @@ var op = {
// })

var bowerRepos = [{ repo : 'client'}]
var bowertasks = []
bowerRepos.forEach(repodef => {
repotasks.push(() => {
bowertasks.push(() => {
console.log(instanceroot + '/' + repodef.repo + '/node_modules/bower/bin/bower')
// var p = nodeShellExec('node_modules/bower/bin/bower', ['install'], {
var p = nodeShellExec(`"${gitbash}"`, ['-c', '"node_modules/bower/bin/bower i"'], {
@@ -1401,7 +1404,7 @@ var op = {
})
})
// console.log('rmtasks.length : ' + rmtasks.length)
return Promise.all(rmtasks).then(() => any(repotasks));
return Promise.all(rmtasks).then(() => any(repotasks)).then(()=>any(bowertasks));
}).catch(e => {
console.error(e)
}).finally(statuslog.finally)
@@ -1723,7 +1726,9 @@ var op = {
tasks = tasks.concat(
[
() => {
var p = nodeShellExec('mklink', ['/J', 'data', runconfig.use + '-data' + '-' + process.env.NODE_ENV], {
var dataToLink = runconfig.use + '-data' + '-' + process.env.NODE_ENV
if(!existsSync(dataToLink)) dataToLink = runconfig.use + '-data';
var p = nodeShellExec('mklink', ['/J', 'data', dataToLink], {
inherit: true, shell: true
, cwd : instanceroot
, env: process.env
@@ -2379,12 +2384,13 @@ var instanceData = (function(){
return {
clusterNodeInstance(selected) { var clusternodename = 'node01'
return __acquireData(selected, selected.username, clusternodename
, selected.instanceName + '-config-' + selected.node_env + `-${clusternodename}`
, selected.instanceName + '-data-' + selected.node_env + `-${clusternodename}`
, function(e){ console.info('Customized node level config not found. This is not an Error. Will attempt with owner level config.');
return e; }
)
}
, ownerInstnace(selected) { return __acquireData(selected, selected.username, null, null
, ownerInstnace(selected) { return __acquireData(selected, selected.username, null
, selected.instanceName + '-data-' + selected.node_env
, function(e){ console.info('Customized user level config not found. This is not an Error. Will attempt global common instance config.');
return e }
)
@@ -2499,7 +2505,7 @@ var __acquireConfig = function (selected, owner, clusternodename, configrepo, er

var __acquireData = function (selected, owner, clusternodename, datarepo, errHandler) {

datarepo = datarepo || selected.instanceName + '-data-' + selected.node_env;
datarepo = datarepo || selected.instanceName + '-data';

var errorHandler = (e) => {
if(e.messages.join(' ').match(new RegExp (`fatal: unable to access '${selectedinstance.reposerver}/${owner}/${datarepo}.git/': Failed to connect to .*? port .*? after .*? ms: Timed out`))){

読み込み中…
キャンセル
保存