首页 文章

浏览器无法显示GULP SERVE SharePoint Workbench

提问于
浏览
1

Browser Cant Display GULP SERVE SharePoint Workbench

我正在尝试使用 Visual Studio CODE (version 1.22.2) 创建一个SharePoint 2016 Web部件,并且我专注于Windows Server 2012环境,因为我有更多的控制权......

给出一些背景知识:* Windows 10机器:我自己构建的个人机器,我是管理员,所有功能都按预期工作 . * Windows Server 2012 R2:工作机器,我必须忍受我拥有的东西 . 我是本地管理员但无法安装任何内容......所有现有应用程序都是由使用预打包部署工具的管理员安装的 . 有一些(未知的)安全限制(可能是组策略)可能会导致问题 . * Windows 7:工作机器,我必须忍受我拥有的东西 . 我现在是本地管理员,但所有现有应用程序都是由其他人使用预先打包的部署工具安装的......有一些(未知的)安全限制(可能是组策略)可能导致问题 .

  • 我不得不为了让环境使用“ yo @microsoft/sharepoint ”命令而战斗......

  • 然后我不得不争取只是为了让gulp运行(它说sp-build-web没有安装,即使它是......)

现在我无法让浏览器真正达到gulp服务 . 是的,我试过“$ env: NODE_NO_HTTP2=1 " command. -Yes I also used the " gulp trust-dev-cert ”命令

Internet Explorer 11 仅显示: This page can't be displayed * Make sure the web address https://localhost:5432 is correct. * Look for the page with your search engine. * Refresh the page in a few minutes.

Chrome 显示类似的错误 .

我已经没想完了 . 我没有看到任何错误,我可以继续跟进......

有人可以帮忙吗?

我安装了 NodeJS v9.4.0 以及以下npm软件包:PS C:\ code \ VSCode \ amtdHeadlines_untethered> npm list -g --depth = 0 C:\ Users \ UName \ AppData \ Roaming \ npm - @ microsoft / generator-sharepoint @ 1.4.1 - @ microsoft / sp-build-web @ 1.4.1 - @ microsoft / sp-client-base @ 1.0.0 - @ microsoft / sp-client-preview @ 1.4.1 - @ microsoft / sp-core-library@1.4.1 - @ microsoft / sp-module-interfaces @ 1.4.1 - @ microsoft / sp-page-context @ 1.4.1 - @ microsoft / sp-webpart-base @ 1.4 . 1 - @ microsoft / sp-webpart-workbench @ 1.4.1 - @ types / chai @ 4.1.3 - @ types / mocha @ 5.2.0 - ajv@6.4.0 - ansi-regex@2.1 . 1 - balanced-match@1.0.0 - brace-expansion@1.1.11 - code-point-at@1.1.0 - compass@0.1.1 - concat-map@0.0.1 - console- control-strings@1.1.0 - express@4.16.3 - generator-aspnet@0.3.3 - generator-code@1.1.30 - generator-hottowel@0.6.1 - generator-webapp@3.0.1 - graceful-fs@4.1.11 - grunt@1.0.2 +-- gulp@4.0.0 - inherits@2.0.3 - is-fullwidth-code-point@1.0.0 - minimatch@3.0.4 - minimis t@0.0.8 - minipass@2.2.4 - mkdirp@0.5.1 - mocha@5.1.1 - ncu@0.2.1 - npm@6.0.0 - npm-check-updates@2.14 . 2 - number-is-nan@1.0.1-office-ui-fabric-js@1.5.0-office-ui-fabric-react@5.94.0- once@1.4.0- react@16.3 .2 - react-addons-update@15.6.2 - react-dom@16.3.2 - request@2.85.0 - safe-buffer@5.1.2 - string-width@1.0.2 - strip -ansi@3.0.1 - wrappy@1.0.2 - yallist@3.0.2 - yarn@1.6.0` - yo@2.0.2

PS C:\code\VSCode\amtdHeadlines_untethered> gulp serve
Build target: DEBUG
[17:34:15] Using gulpfile C:\code\VSCode\amtdHeadlines_untethered\gulpfile.js
[17:34:15] Starting gulp
[17:34:15] Starting 'serve'...
[17:34:15] Starting subtask 'pre-copy'...
[17:34:15] Finished subtask 'pre-copy' after 8.26 ms
[17:34:15] Starting subtask 'copy-static-assets'...
[17:34:15] Starting subtask 'sass'...
[17:34:16] Finished subtask 'sass' after 904 ms
[17:34:16] Starting subtask 'tslint'...
[17:34:16] Starting subtask 'typescript'...
[17:34:16] [typescript] TypeScript version: 2.2.2
[17:34:16] Finished subtask 'copy-static-assets' after 939 ms
[17:34:18] Finished subtask 'tslint' after 1.45 s
[17:34:18] Finished subtask 'typescript' after 1.45 s
[17:34:18] Starting subtask 'ts-npm-lint'...
[17:34:18] Finished subtask 'ts-npm-lint' after 8.62 ms
[17:34:18] Starting subtask 'api-extractor'...
[17:34:18] Finished subtask 'api-extractor' after 1.33 ms
[17:34:18] Starting subtask 'post-copy'...
[17:34:18] Finished subtask 'post-copy' after 700 μs
[17:34:18] Starting subtask 'collectLocalizedResources'...
[17:34:18] Finished subtask 'collectLocalizedResources' after 5.07 ms
[17:34:18] Starting subtask 'configure-webpack'...
[17:34:18] Finished subtask 'configure-webpack' after 504 ms
[17:34:18] Starting subtask 'webpack'...
(node:6804) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https
://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
[17:34:19] Finished subtask 'webpack' after 676 ms
[17:34:19] Starting subtask 'configure-webpack-external-bundling'...
[17:34:19] Finished subtask 'configure-webpack-external-bundling' after 1.14 ms
[17:34:19] Starting subtask 'copy-assets'...
[17:34:19] Finished subtask 'copy-assets' after 63 ms
[17:34:19] Starting subtask 'write-manifests'...
[17:34:19] Finished subtask 'write-manifests' after 407 ms
[17:34:19] Starting subtask 'serve'...

在端口5432上启动api服务器.Registring api:/ getwebparts Registring api:/ . Registring api:/ workbench [17:34:20] 483 ms之后完成的子任务'serve' [17:34:20] 4.61秒后完成'serve'(节点:6804)实验警告:http2模块是一个实验性API . [17:34:20]服务器启动https://localhost:4321 [17:34:20] LiveReload从端口35729开始[17:34:20]使用默认的OS应用程序打开https://localhost:5432/workbench请求:[:: 1] '/workbench' [17:34:20 ] ================== [已完成] ================== [17:34:21]项目amtd- headlines-untethered版本:0.0.1 [17:34:21]构建工具版本:2.5.3 [17:34:21]节点版本:v9.4.0 [17:34:21]总持续时间:7.79秒

1 回答

  • 0

    释放端口5432,因为它可能正被另一个进程使用 .

    或者使用不同的配置为应用程序服务 . 转到'config.serve.js'并将端口更改为首选端口,例如从'5432'到'8080'如下:

    {
     "$schema": "https://developer.microsoft.com/json-schemas/core- 
    build/serve.schema.json",
    "port": 4321,
    "https": true,
    "initialPage": "https://localhost:8080/workbench",
    "api": {
       "port": 8080,
       "entryPath": "node_modules/@microsoft/sp-webpart-workbench/lib/api/"
      }
    }
    

相关问题