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

empty 404.html file is generated #1626

Open
anuj-scanova opened this issue Oct 18, 2022 · 1 comment
Open

empty 404.html file is generated #1626

anuj-scanova opened this issue Oct 18, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@anuj-scanova
Copy link

anuj-scanova commented Oct 18, 2022

🐞 Bug report

Description

When rendering Scully, it generates a 404.html file at the root of the output directory with the following content

<!DOCTYPE html><html lang="en-US" dir="ltr"><head>
  <meta charset="utf-8">
  <title>Title</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>

<app-root></app-root>

<script src="runtime.6f0cf46042137677.js" type="module"></script><script src="polyfills.25496f96c6795738.js" type="module"></script><script src="main.a6b398da8515d7cc.js" type="module"></script>

</body></html>

The content of the page is empty, so there is no use for this 404 file.

I created a custom 404 file and add route to the angular router

{
  path: '404.html',
  component: NotFoundComponent
}

But on rendering, it gives an error

  x Error during file write Error: ENOTDIR: not a directory, open '/.../project/dist/static/en-US/404.html/index.html'

🔬 Minimal Reproduction

💻Your Environment

Angular Version:




     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 14.1.3
Node: 16.16.0
Package Manager: npm 8.11.0 
OS: darwin arm64

Angular: 14.1.3
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic
... platform-server, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1401.3
@angular-devkit/build-angular   14.1.3
@angular-devkit/core            14.1.3
@angular-devkit/schematics      14.1.3
@nguniversal/builders           14.1.0
@nguniversal/express-engine     14.1.0
@schematics/angular             14.1.3
rxjs                            7.5.6
typescript                      4.7.4


Scully Version:




2.1.36

🔥 Exception or Error




  x Error during file write Error: ENOTDIR: not a directory, open '/.../project/dist/static/en-US/404.html/index.html'
@nelsongutidev
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants