Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

prerender: An unhandled exception occurred: Could not find the main bundle: <PATH>/server/main.js #2602

@sanjay51

Description

@sanjay51

🐞 Bug report

What modules are related to this issue?

  • builders
  • common
  • express-engine

Is this a regression?

No / Not sure

Description

When I run npm run prerender, I get this error:

An unhandled exception occurred: Could not find the main bundle: /Users/.../dist/myproject/server/main.js
See "/private/var/folders/4x/q8_vdsrd4wzc7y6n3yfkl6gw0000gn/T/ng-SkPjd6/angular-errors.log" for further details.

I found that other people also had the same issue, but didn't provide a resolution: #2159

🔬 Minimal Reproduction

npm run prerender

🔥 Exception or Error

An unhandled exception occurred: Could not find the main bundle: /Users/.../dist/myproject/server/main.js
See "/private/var/folders/4x/q8_vdsrd4wzc7y6n3yfkl6gw0000gn/T/ng-SkPjd6/angular-errors.log" for further details.

🌍 Your Environment


Node.js version v17.8.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.

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

Angular CLI: 13.3.2
Node: 17.8.0 (Unsupported)
Package Manager: npm 8.5.5
OS: darwin x64

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

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1303.2
@angular-devkit/build-angular   13.3.2
@angular-devkit/core            13.3.2
@angular-devkit/schematics      13.3.2
@angular/cdk                    12.2.13
@angular/fire                   6.1.5
@angular/material               12.2.13
@nguniversal/builders           12.1.3
@nguniversal/express-engine     12.1.3
@schematics/angular             13.3.2
rxjs                            6.6.7
typescript                      4.4.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    need: repro stepsWe cannot reproduce the issue with the information given

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions