【问题标题】:'yo office' not responding after a long time“哟办公室”很久没有回应
【发布时间】:2016-11-20 22:25:19
【问题描述】:

我正在按照https://dev.office.com/getting-started/addins#selectapp 此处的说明制作我的第一个 MS Office PowerPoint 插件。

我安装了 yeoman 生成器并运行了这个命令yo office

yo office                                                                                                                                    ⏎

     _-----_     ╭──────────────────────────╮
    |       |    │   Welcome to the Office  │
    |--(o)--|    │   Project generator, by  │
   `---------´   │ @OfficeDev! Let's create │
    ( _´U`_ )    │    a project together!   │
    /___A___\   /╰──────────────────────────╯
     |  ~  |     
   __'.___.'__   
 ´   `  |° ´ Y ` 

? Project name (display name):  myHelloWorldAddin
? Root folder of project? Default to current directory
 (/Users/antkong/dev/zeetings/ppt), or specify relative path
 from current (src / public):  .
? Office project type: Task Pane Add-in
? Supported Office applications: (Press <space> to select, <a> to toggle all, <i> to inverse selection)Word, Excel, PowerPoint, OneNote, Project
? Technology to use: HTML, CSS & JavaScript
   create bower.json
   create package.json
   create tsd.json
   create .bowerrc
   create gulpfile.js
   create content/Office.css
   create images/close.png
   create images/logo-filled.png
   create scripts/MicrosoftAjax.js
   create jsconfig.json
   create tsconfig.json
   create manifest-myhelloworldaddin.xml
   create manifest.xsd
   create app/app.css
   create app/app.js
   create app/home/home.html
   create app/home/home.css
   create app/home/home.js

它在最后一行停留了很长时间(现在最多 15 分钟)。

我该如何解决这个问题?是否有任何日志文件我可以检查以找出问题?

【问题讨论】:

    标签: office365 yeoman office-addins office-js yo


    【解决方案1】:

    我刚刚在与我自己不同的机器上测试了生成器。它以user 0m33.462s 的交互时间在real 1m18.625s 中成功运行。看看它在哪里停下来,你办公室接下来要做的就是连接到不同的 git 远程源并安装所需的子模块。我建议退出并再次运行你的办公室。 :)

    Repo 住在这里 - https://github.com/officedev/generator-office

    如果您对调试感兴趣并为生成器做出贡献,您可以通过运行它来传递 Node.js 调试标志:

    # OS X / Linux
    node --debug `which yo` <generator> [arguments]
    
    # Windows
    # Find the path to the yo binary in Command Prompt
    where yo
    # Or find the path to the yo binary in PowerShell
    get-command yo
    # Would be something like C:\Users\<USER>\AppData\Roaming\npm\yo
    # Use this path to derive yo cli.js file
    # C:\Users\<USER>\AppData\Roaming\npm\node_modules\yo\lib\cli.js
    node --debug <path to yo cli.js> <generator> [arguments]
    

    【讨论】:

      【解决方案2】:

      我在各种各样的限制背后工作了很多,企业环境并不容易。在下面找到我的所有建议列表:

      • 验证代理,npm默认不使用代理,将proxy和http-proxy设置为你公司的一个
      • 验证严格的 ssl 标志设置为 false,这通常会导致下载失败(公共/私有网络之间的经典流量问题)
      • 验证在 npm 中正确设置注册表以使用(通常)registry.npmjs.org

      我还遇到了几个问题,具体取决于节点版本和 npm 版本。大多数时候我无法控制我使用的版本。 当我运行前面提到的调试模式时,我更幸运地理解了潜在的问题。先前响应中的命令已弃用,其中一些已更改,但您几乎可以:

      1. 使用 'where yo' 查找 yo 的安装位置
      2. 转到文件夹并找到位于 [基本文件夹]\lib\cli.js 中的 yo 模块
      3. 使用 node --inspect [full path to cli] [your parameters] 执行它

      使用这种方法,每个问题都会立即出现。

      【讨论】:

        猜你喜欢
        • 2020-12-09
        • 1970-01-01
        • 1970-01-01
        • 2011-10-22
        • 2010-11-07
        • 1970-01-01
        • 1970-01-01
        • 2014-10-23
        • 2022-12-11
        相关资源
        最近更新 更多