2

Browser Cant Display GULP SERVE SharePoint Workbench

I am trying to create a SharePoint 2016 web-part using Visual Studio CODE (version 1.22.2) and I've been struggling to get the dev environment to work in both Windows 7 and Windows Server 2012 R2 (exact same setup works fine on Windows 10). Right now, I'm focusing on the Windows Server 2012 environment, since I have a little more control there...

To give a bit of background: * Windows 10 Machine: Personal machine I built myself, I am Administrator, all features work as expected. * Windows Server 2012 R2: Work Machine, I have to live with what I have. I am a local administrator but cannot install anything... All of the existing apps were installed by administrators who used pre-packaged deployment tools. There are some (unknown) security restrictions in place (probably group policies) that may be causing problems. * Windows 7: Work Machine, I have to live with what I have. I am now a local administrator but all of the existing apps were installed by someone else using pre-packaged deployment tools... There are some (unknown) security restrictions in place (probably group policies) that may be causing problems.

  • I had to fight just to get the environment to use the "yo @microsoft/sharepoint" command...
  • Then I had to fight just to get gulp to run (it was saying sp-build-web was not installed even though it was...)

Now I cannot get a browser to actually reach the gulp serve. -Yes, I tried the "$env:NODE_NO_HTTP2=1" command. -Yes I also used the "gulp trust-dev-cert" command

Internet Explorer 11 only shows: 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 displays a similar error.

I've run out of ideas. I don't see any errors below I can continue to follow up on...

Can someone help please?

I have NodeJS v9.4.0 installed and the following npm packages: PS C:\code\VSCode\amtdHeadlines_untethered> npm list -g --depth=0 C:\Users\UName\AppData\Roaming\npm +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @microsoft/[email protected] +-- @types/[email protected] +-- @types/[email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] +-- [email protected] `-- [email protected]

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'... 

Starting api server on port 5432. Registring api: /getwebparts Registring api: /. Registring api: /workbench [17:34:20] Finished subtask 'serve' after 483 ms [17:34:20] Finished 'serve' after 4.61 s (node:6804) ExperimentalWarning: The http2 module is an experimental API. [17:34:20] Server started https://localhost:4321 [17:34:20] LiveReload started on port 35729 [17:34:20] Opening https://localhost:5432/workbench using the default OS app Request: [::1] '/workbench' [17:34:20] ==================[ Finished ]================== [17:34:21] Project amtd-headlines-untethered version: 0.0.1 [17:34:21] Build tools version: 2.5.3 [17:34:21] Node version: v9.4.0 [17:34:21] Total duration: 7.79 s

1 Answer 1

3

Free the port 5432 since it is probably being used by another process.

Alternatively serve the application using a different config. Go to 'config.serve.js' and change the port to your preferred port e.g. from '5432' to '8080' as follows:

{ "$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/" } } 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.