美文网首页
TeamCity平台执行npm install没反应

TeamCity平台执行npm install没反应

作者: hphua | 来源:发表于2017-09-30 15:57 被阅读0次

    npm版本


    TeamCity项目配置为:


    执行run项目后,npm install指令一直执行中,但没有任何反应。
    没有定位到问题原因,尝试替换为yarn来添加依赖包。

    YARN官网:https://yarnpkg.com
    下载安装YARN后,TeamCity的Agent服务需要<font color=red>重启</font>下,才能生效。

    TeamCity中的任务指令改为yarn,效果如下:


    run项目后,可能会报问题:

    [15:06:32][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:07:11][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:07:26][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:07:30][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:07:36][Step 1/4] warning babel-preset-es2015@6.24.1: We're super 馃樃  excited that you're trying to use ES2015 syntax, but instead of continuing yearly presets 馃槶 , we recommend using babel-preset-env: npm install babel-preset-env. preset-env without options will compile ES2015+ down to ES5. And by targeting specific browsers, Babel can do less work and you can ship native ES2015+ to users 馃槑 ! Also, we are in the process of releasing v7, so give http://babeljs.io/blog/2017/09/12/planning-for-7.0 a read and test it! Thanks so much for using Babel 馃檹 , please give us a follow @babeljs for updates, join slack.babeljs.io for discussion and help support at opencollective.com/babel
    [15:08:07][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:08:19][Step 1/4] warning express@2.5.11: express 2.x series is deprecated
    [15:08:19][Step 1/4] warning connect@1.9.2: connect 1.x series is deprecated
    [15:08:55][Step 1/4] warning There appears to be trouble with your network connection. Retrying...
    [15:09:22][Step 1/4] error An unexpected error occurred: "https://registry.yarnpkg.com/postcss-modules-values: connect ETIMEDOUT 104.16.63.173:443".
    [15:09:22][Step 1/4] info If you think this is a bug, please open a bug report with the information provided in "E:\\BuildAgent2\\work\\81f07a77be17b43b\\yarn-error.log".
    [15:09:22][Step 1/4] info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
    [15:09:22][Step 1/4] Process exited with code 1
    

    此问题解决方法参考:http://www.jianshu.com/p/c60bdd6f07be,可在cmd中执行以下指令:

    npm config set registry https://registry.npm.taobao.org
    npm config set disturl https://npm.taobao.org/dist
    

    这样就可以了。

    相关文章

      网友评论

          本文标题:TeamCity平台执行npm install没反应

          本文链接:https://www.haomeiwen.com/subject/hexnextx.html