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

The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths #96

Closed
charris-msft opened this issue Oct 17, 2024 · 3 comments · Fixed by #98

Comments

@charris-msft
Copy link

I'm getting the following error when running azd up:

ERROR: error executing step command 'package --all': failed building service 'web': failed invoking event handlers for 'prebuild', 'prebuild' hook failed with exit code: '1', Path: 'C:\Users\charris\AppData\Local\Temp\azd-prebuild-1235103698.ps1'. : exit code: 1, stdout:
up to date, audited 265 packages in 801ms

found 0 vulnerabilities

> [email protected] build
> tsc && vite build

vite v4.5.5 building for production...
transforming...
✓ 4146 modules transformed.
rendering chunks...
✓ built in 9.12s
, stderr: [vite:build-html] The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "d:/git/azure_agent/evals/GH_MVPS/src/frontend/index.html".
error during build:
    at async Bundle.generate (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/rollup/dist/es/shared/node-entry.js:17930:9)
    at async file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/rollup/dist/es/shared/node-entry.js:26785:27
    at async catchUnfinishedHookActions (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/no    at async Bundle.generate (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/rollup/dist/es/shared/node-entry.js:17930:9)
    at async file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/rollup/dist/es/shared/node-entry.js:26785:27
    at async catchUnfinishedHookActions (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/rollup/dist/es/shared/node-entry.js:25910:16)
    at async build (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/vite/dist/node/chunks/dep-b2890f90.js:48085:22)
    at async CAC.<anonymous> (file:///d:/git/azure_agent/evals/GH_MVPS/src/frontend/node_modules/vite/dist/node/cli.js:842:9)
@pamelafox
Copy link
Contributor

This SO thread has a few ideas:
https://stackoverflow.com/questions/77694425/react-vite-typescript-fails-in-jenkins-but-succeeds-locally

Is there something funky about the D drive? Is it using symlinks or something?
Also is your node up to date?

@charris-msft
Copy link
Author

Good call! I do use symlinks so it appears that all my files are on my C: drive.
The following fixed the issue:

Image

@pamelafox
Copy link
Contributor

Nice! Okay, then I think I can safely make that change to the repo.

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