Azure-Samples / contoso-real-estate

Intelligent enterprise-grade reference architecture for JavaScript, featuring OpenAI integration, Azure Developer CLI template and Playwright tests.
MIT License
860 stars 511 forks source link

[Chore] Deploy fails due to portal - looks like TypeScript issue #392

Closed diberry closed 10 months ago

diberry commented 10 months ago

Are you accessing the project from the GitHub Codespaces?

Note: The project is optimized to run on Codespaces. We welcome contributions to enhance it for cross-platform local development, but it's not something we will prioritize right now. Thank you!

Describe the bug

  (x) Failed: Deploying service portal

ERROR: failed packaging service 'portal': failing invoking action 'package', failed to run NPM script build, exit code: 1, stdout: 
> portal@0.0.0 build
> ng build

---------------------------------
- Verbose:  true
- Prefix:  (CODESPACE|GITHUB)_
- Root directory:  .
- Working directory:  /workspaces/contoso-real-estate/packages/portal
- Environment files: 
- Injected keys:
 ✔ NG_APP_ENV => undefined
 ✔ CODESPACE_NAME
 ✔ CODESPACE_VSCODE_FOLDER
 ✔ GITHUB_API_URL
 ✔ GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN
 ✔ GITHUB_CODESPACE_TOKEN
 ✔ GITHUB_GRAPHQL_URL
 ✔ GITHUB_REPOSITORY
 ✔ GITHUB_SERVER_URL
 ✔ GITHUB_TOKEN
 ✔ GITHUB_USER
---------------------------------

, stderr: - Generating browser application bundles (phase: setup)...
✔ Browser application bundle generation complete.
✔ Browser application bundle generation complete.

Error: src/app/core/apollo/provide-apollo.ts:10:24 - error TS2339: Property 'strapiGraphQlUri' does not exist on type '{ production: boolean; blogUrl: string; isCodespaces: boolean; strapiGraphQlUriInCodespace: string; strapiGraphQlUriFallback: string; }'.

10       uri: environment.strapiGraphQlUri,
                          ~~~~~~~~~~~~~~~~

npm ERR! Lifecycle script `build` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: portal@0.0.0 
npm ERR!   at location: /workspaces/contoso-real-estate/packages/portal 

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Type in command '...'
  3. Click on '...'
  4. Scroll down to '...'
  5. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

OS (please complete the following information):

Additional context Add any other context about the problem here.

diberry commented 10 months ago

I'm not sure where the strapiGraphQlUri is supposed to be coming from or why it is now not found. I assume this is either a dependencies issue because I did spot a duplicate definition in my package.json for angular but perhaps it is something from azd or changes in that area. @sinedied do you have time to meet next week to walk through this?

manekinekko commented 10 months ago

PR #394 will fix this issue.