sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

[SPFx 1.22.1] Placeholder {tenantdomain} was found in serve.json warning message even though it doesn't exist

Open kbeverforden opened this issue 11 months ago β€’ 4 comments

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

πŸ’₯ SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • [ ] πŸ’₯ Internet Explorer
  • [x] πŸ’₯ Microsoft Edge
  • [ ] πŸ’₯ Google Chrome
  • [ ] πŸ’₯ FireFox
  • [ ] πŸ’₯ Safari
  • [ ] mobile (iOS/iPadOS)
  • [ ] mobile (Android)
  • [ ] not applicable
  • [ ] other (enter in the "Additional environment details" area below)

Additional environment details

No response

Describe the bug / error

I have updated serve.json but I still see this warning when I run heft start

[build:configure-webpack-serve] Placeholder {tenantdomain} was found in serve.json but OS variable SPFX_SERVE_TENANT_DOMAIN is not set. Either set the environment variable or update the serve.json initial page url.

The "heft start" alias was expanded to "heft build-watch --serve".

Starting incremental build...
 ---- build started ---- 
[build:set-browserslist-ignore-old-data-env-var] Setting environment variable BROWSERSLIST_IGNORE_OLD_DATA=1
[build:sass] Generating sass typings...
[build:copy-javascript] Copied 10 files and linked 0 files
[build:sass] Generated sass typings
[build:typescript] Using TypeScript version 5.8.3
[build:typescript] Starting compilation in watch mode...
[build:typescript] Found 0 errors. Watching for file changes.
[build:typescript] Copied 156 files and linked 0 files
[build:lint] Linting isn't currently supported in watch mode
[build:configure-webpack-serve] Placeholder {tenantdomain} was found in serve.json but OS variable SPFX_SERVE_TENANT_DOMAIN is not set. Either set the environment variable or update the serve.json initial page url.
[build:configure-webpack-serve] Launching initial page: https://xxxxxx.sharepoint.com/sites/ClientPortalQA/_layouts/15/workbench.aspx?debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fbuild%2Fmanifests.js&debug=true&noredir=true
Webpack patch plugin applying 1 patch file(s)
Applying QA settings to webpack
[build:webpack] Using Webpack version 5.103.0
[build:webpack] Starting webpack-dev-server
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: https://localhost:4321/, https://[::1]:4321/
[build:webpack] Started Webpack Dev Server at https://[::1]:4321/
[build:webpack] Running incremental Webpack compilation
[build:configure-webpack-serve] 
[build:configure-webpack-serve]  ╔═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
[build:configure-webpack-serve]  β•‘                                                                 To load your scripts, use this query string:                                                                  β•‘
[build:configure-webpack-serve]  β•‘                                   ?debugManifestsFile=https%3A%2F%2Flocalhost%3A4321%2Ftemp%2Fbuild%2Fmanifests.js&debug=true&noredir=true                                    β•‘
[build:configure-webpack-serve]  β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•
[build:configure-webpack-serve]
webpack 5.103.0 compiled successfully in 17372 ms
 ---- build finished (46.793s) ---- 
-------------------- Finished (46.815s) --------------------
Waiting for changes. Press CTRL + C to exit...

serve.json (replaced my company name with xxxxxxx in this ticket for privacy)

{
    "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/spfx-serve.schema.json",
    "port": 4321,
    "https": true,
    "initialPage": "https://xxxxxx.sharepoint.com/sites/ClientPortalQA/_layouts/15/workbench.aspx?debug=true&noredir=true&debugManifestsFile=https://localhost:4321/temp/build/manifests.js"
}

Steps to reproduce

Run heft start after updating serve.json

Expected behavior

Warning message about {tenantdomain} should not be visible.

kbeverforden avatar Dec 15 '25 21:12 kbeverforden

Hello @kbeverforden, Thank you for bringing this issue to our attention. We will look into it and get back to you shortly.
If you don’t receive a reply within two working days, please use this escalation form to escalate.

Ashlesha-MSFT avatar Dec 16 '25 04:12 Ashlesha-MSFT

@kbeverforden, We were able to reproduce the issue, and we are investigating it. We have logged this as a bug, and our engineering team will look into it. Thank you! Placeholder {tenantdomain} was found in serve.json but OS variable SPFX_SERVE_TENANT_DOMAIN is not set. Either set the environment variable or update the serve.json initial page url.

Ashlesha-MSFT avatar Dec 16 '25 07:12 Ashlesha-MSFT

@kbeverforden, The issue is resolved β€”heft start runs without the warning. Can you please verify on your end and close the issue if confirmed?

Ashlesha-MSFT avatar May 21 '26 06:05 Ashlesha-MSFT

@kbeverforden, Your feedback is important to us. Please rate us:

🀩 Excellent πŸ™‚ Good 😐 Average πŸ™ Needs Improvement 😠 Poor

Ashlesha-MSFT avatar Jun 01 '26 08:06 Ashlesha-MSFT