question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error: universal build:prerender fails

See original GitHub issue

I’m submitting a…


[x] Bug report  
[ ] Feature request
[ ] Documentation issue or request

In package


[ ] @ng-toolkit/init
[ ] @ng-toolkit/serverless
[x] @ng-toolkit/universal
[ ] @ng-toolkit/pwa
[ ] @ng-toolkit/firebug

Current behavior

ng new myApp
cd myApp
ng add @ng-toolkit/universal
npm run build:prerender

Results in:

internal/fs/utils.js:220
    throw err;
    ^

Error: ENOENT: no such file or directory, open 'src/@nguniversal/module-map-ngfactory-loader.ts'

Expected behavior

Should build without errors. npm run build:ssr works just fine in this case.

Environment


Angular CLI: 8.3.9
Node: 12.13.1
OS: win32 x64
Angular: 8.2.10

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
MeTheCatcommented, Dec 4, 2019

@KingDarBoja Copied it, along with static.paths.ts. It gave me a warning to turn on allowSyntheticDefaultImports, which I did. After that prerender ran successfully.

0reactions
KingDarBojacommented, Dec 19, 2019

@juulhobert Can you share your package.json ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular Universal build prerender error #370 - GitHub
Bug with your library and Angular Universal build prerender ... libraries aren't being built correctly, which means Angular Universal fails:
Read more >
I am getting some error when building my angular universal ...
The solution was to upgrade my npm packages using npm audit fix I am not sure which of the many packages upgraded solved...
Read more >
Issues · maciejtreder/ng-toolkit · GitHub
[@ng-toolkit/universal] ERROR: newTree.optimize is not a function comp: universal Universal Package type: bug Issues that break the functionality.
Read more >
Google Cloud Run with Angular Universal listening port error ...
Google Cloud Run with Angular Universal listening port error · I am getting some error when building my angular universal app with npm...
Read more >
angular/universal - Gitter
@nogo0d don't think there's a way as most of the errors are async. if you ... the setup on my app and I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found