如何解决 Office 加载项 (Outlook) 的此 NPM/Yeoman 错误日志?

How do I resolve this NPM / Yeoman error log for an Office Add-in (Outlook)?

我正在关注 Microsoft Office Add-in Project Generator - YO OFFICE!

当我尝试 npm start 时,它崩溃了,我在下面显示了命令行输出。

注意事项:

所以,这是命令行输出:

F:\DropBox\programs\xampp\htdocs\zaq\zaq>npm start

> zaq@0.1.0 start F:\DropBox\programs\xampp\htdocs\zaq\zaq
> webpack-dev-server --mode development --https --key ./certs/server.key --cert ./certs/server.crt --cacert ./certs/ca.crt --port 3000

F:\DropBox\programs\xampp\htdocs\zaq\zaq\node_modules\webpack-cli\bin\config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

TypeError: Cannot read property 'properties' of undefined
    at module.exports (F:\DropBox\programs\xampp\htdocs\zaq\zaq\node_modules\webpack-cli\bin\config-yargs.js:89:48)
    at Object.<anonymous> (F:\DropBox\programs\xampp\htdocs\zaq\zaq\node_modules\webpack-dev-server\bin\webpack-dev-server.js:84:40)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
    at Function.Module._load (internal/modules/cjs/loader.js:529:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
    at startup (internal/bootstrap/node.js:285:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! zaq@0.1.0 start: `webpack-dev-server --mode development --https --key ./certs/server.key --cert ./certs/server.crt --cacert ./certs/ca.crt --port 3000`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the zaq@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\me\AppData\Roaming\npm-cache\_logs18-10-16T18_48_40_772Z-debug.log

F:\DropBox\programs\xampp\htdocs\zaq\zaq>

请注意 "complete log of this run" 不是很有趣。如果被问到,我可以 post,但是 1) 提出这个问题 "noisy" 和 2) 很难 "complete",因为它甚至没有提到错误。

关于报错:

F:\DropBox\programs\xampp\htdocs\zaq\zaq\node_modules\webpack-cli\bin\config-yargs.js:89
                                describe: optionsSchema.definitions.output.properties.path.description,
                                                                           ^

这是文件的相关部分,从第 87 行开始:

        "output-path": {
            type: "string",
            describe: optionsSchema.definitions.output.properties.path.description,
            group: OUTPUT_GROUP,
            defaultDescription: "The current directory",
            requiresArg: true
        },

我可以 post 整个文件,但它是生成的,我没有编辑它。

我所做的就是

  1. 安装 NPM
  2. 哟办公室
  3. 将自签名证书添加为受信任的根证书
  4. npm 启动

知道如何更正此问题并获得 "out of the box demo" 运行 吗?

我试过'npm i webpack@4.18.0'或'npm i webpack-cli@latest'

两者都对我有用。

对于上下文重新。 https://github.com/webpack/webpack/issues/8082