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

ENOENT: no such file or directory dist/{PROJECT_NAME}/browser/index.html #2847

Closed
Teebo opened this issue May 28, 2021 · 1 comment
Closed

Comments

@Teebo
Copy link

Teebo commented May 28, 2021

This might not be an issue with angularfire but an issue on my side.
When ng deploy --preview command is run the application loads in the browser on port 5000.
However when I deploy by running ng deploy I get an error that the index.html file is not found.
When I check in the target location, there is an index.original.html instead of index.html and also the dist folder
is nested in another dist folder.

Is there something I am missing in the configuration maybe?
Is it possible to configure the server that it finds the index.original.html? Or configure the build to create the index.html file?

This issue might be linked to #2765

Version info

Angular:
9.0.3
Firebase:
8.2.1
AngularFire:
6.1.4
Other (e.g. Ionic/Cordova, Node, browser, operating system):
Chrome browser

How to reproduce these conditions

Run ng deploy
Failing test unit, Stackblitz demonstrating the problem

Steps to set up and reproduce

Sample data and security rules

Debug output

i  deploying functions, hosting
i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
✔  functions: required API cloudfunctions.googleapis.com is enabled
✔  functions: required API cloudbuild.googleapis.com is enabled
i  functions: preparing dist/motif directory for uploading...
Error occurred while parsing your function triggers.

Error: ENOENT: no such file or directory, open '/home/teebo/Development/motf/dist/motif/browser/index.html'
    at Object.openSync (fs.js:462:3)
    at Object.readFileSync (fs.js:364:35)
    at Object.wOnm (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:6424436)
    at __webpack_require__ (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:317)
    at Object.0 (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:104111)
    at __webpack_require__ (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:317)
    at +3pF (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:2089)
    at Object.<anonymous> (/home/teebo/Development/motf/dist/motif/dist/motif/server/main.js:1:2134)
    at Module._compile (internal/modules/cjs/loader.js:1118:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)

Expected behavior

Deploy the application to firebase

Actual behavior

An error is given

@Teebo Teebo changed the title ENOENT: no such file or directory dist/{PROJECT_NAME}/browser.index.html ENOENT: no such file or directory dist/{PROJECT_NAME}/browser/index.html May 28, 2021
@jamesdaniels
Copy link
Member

Addressed in 7.0.3

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

No branches or pull requests

2 participants