azure-openai-chat-frontend
azure-openai-chat-frontend copied to clipboard
Can't deploy solution, Packaging fails on missing vite
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:
- App location: ./src
- API location:
- Output location: ./dist
- App build command: npm run build --if-present
- API build command: Building app with npm run build --if-present in ./src ...
[email protected] build vite build
, stderr: npm warn deprecated [email protected]: 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 [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: 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.
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.
Should the predeploy hook be prepackage?
I suggested a pr to resolve this issue