Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
codebytes opened this issue Oct 7, 2024 · 2 comments · May be fixed by #33
Open

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

codebytes opened this issue Oct 7, 2024 · 2 comments · May be fixed by #33

Comments

@codebytes
Copy link

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. (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
Copy link
Contributor

Should the predeploy hook be prepackage?

@codebytes codebytes linked a pull request Oct 7, 2024 that will close this issue
@codebytes
Copy link
Author

I suggested a pr to resolve this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants