Skip to content

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

@Teebo

Description

@Teebo

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions