Bower calls blocked by corporate proxy

前端 未结 16 1228
夕颜
夕颜 2020-11-30 20:00

I\'m trying to use Bower for a web app, but find myself hitting some sort of proxy issues:

D:\\>bower search jquery
bower retry         Request to https:/         


        
16条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 21:01

    I did not have a .bowerrc file to configure my bower settings. I found the settings living in a file called defaults.js. found under "C:\...\bower\node_modules\bower-config\lib\util\defaults.js"
    I hope this helps others:

    var defaults = {
        'cwd': process.cwd(),
        'directory': 'bower_components',
        'registry': 'http://bower.herokuapp.com',
        'shorthand-resolver': 'git://github.com/{{owner}}/{{package}}.git',
        'tmp': paths.tmp,
        'proxy': '<>',  // change proxy here or at the top
        'https-proxy': '<>',  // change proxy here or at the top
        'timeout': 30000,
        'ca': { search: [] },
        'strict-ssl': false,
        'user-agent': userAgent,
        'color': true,
        'interactive': null,
        'storage': {
            packages: path.join(paths.cache, 'packages'),
            links: path.join(paths.data, 'links'),
            completion: path.join(paths.data, 'completion'),
            registry: path.join(paths.cache, 'registry'),
            empty: path.join(paths.data, 'empty')  // Empty dir, used in GIT_TEMPLATE_DIR among others
        }
    };
    
    module.exports = defaults;

提交回复
热议问题