Azure-Samples / azure-openai-chat-frontend

The Chat App Protocol compliant user-interface building block, for your chat-gpt like RAG pattern applications built with Azure OpenAI and Azure AI Search.
MIT License
36 stars 22 forks source link

Can't deploy solution, Packaging fails on missing vite #32

Open codebytes opened 1 week ago

codebytes commented 1 week ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

azd init, azd auth login, azd up

Any log messages given by the failure

Packaging services (azd package)

(x) Failed: Packaging service chatfrontendapp

ERROR: error executing step command 'package --all': failed building service 'chatfrontendapp': swa build: exit code: 1, stdout: Welcome to Azure Static Web Apps CLI (2.0.1)

Using configuration "azure-openai-chat-frontend" from file: D:\azure-openai-chat-frontend\swa-cli.config.json

Build configuration:

azure-openai-chat-frontend@0.0.1 build vite build

, stderr: npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported 'vite' is not recognized as an internal or external command, operable program or batch file. Error: Command failed: npm run build --if-present at genericNodeError (node:internal/errors:984:15) at wrappedFn (node:internal/errors:538:14) at checkExecSyncError (node:child_process:891:11) at execSync (node:child_process:963:15) at runCommand (file:///D:/packages/npm/_npx/64d2a36753158ee1/node_modules/@azure/static-web-apps-cli/src/core/utils/command.ts:5:3) at build (file:///D:/packages/npm/_npx/64d2a36753158ee1/node_modules/@azure/static-web-apps-cli/src/cli/commands/build/build.ts:90:5) at Command. (file:///D:/packages/npm/_npx/64d2a36753158ee1/node_modules/@azure/static-web-apps-cli/src/cli/commands/build/register.ts:32:7) at Command.parseAsync (D:\packages\npm_npx\64d2a36753158ee1\node_modules\commander\lib\command.js:935:5) at run (file:///D:/packages/npm/_npx/64d2a36753158ee1/node_modules/@azure/static-web-apps-cli/src/cli/index.ts:98:3)

Expected/desired behavior

successfuly build/deploy

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Windows 11

Versions

npm 10.8.2 node 20.17.0 azd 1.10.1

Mention any other details that might be useful


Thanks! We'll be in touch soon.

pamelafox commented 1 week ago

Should the predeploy hook be prepackage?

codebytes commented 1 week ago

I suggested a pr to resolve this issue