Problem with main.js file
See original GitHub issueBug Report
Hi, i have problem with SSR on my project. When i run command
ng run project:server
It’s generating main.js file in ./dist/server folder but when i run command
webpack --config webpack.server.config.js --progress --colors
it causes this error:
ERROR in ./dist/server/main.js Module not found: Error: Can't resolve '.' in 'C:\Projects\my-project\dist\server' @ ./dist/server/main.js 81:17-29 @ ./server.ts
.
Line that causes error:
.
When i manually delete this line, webpack command runs correctly.
What modules are related to this issue?
- [ ] aspnetcore-engine
- [ ] common
- [x] express-engine
- [ ] hapi-engine
- [ ] module-map-ngfactory-loader
Angular CLI: 6.0.8
Node: 8.11.3
OS: win32 x64
Angular: 6.0.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cdk 6.4.0
@angular/cli 6.0.8
@angular/material 6.4.0
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.2
typescript 2.7.2
webpack 4.8.3
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Download Main.js and Fix Errors
main.js errors are related to problems that occur at AutoCAD runtime. Generally, JS errors are caused by missing or corrupt files.
Read more >Error in console shows error in main.js on not specific file ...
I am working on a React project and I am trying to debug certain features. I've noticed when I get an error and...
Read more >What went wrong? Troubleshooting JavaScript - MDN Web Docs
Generally speaking, when you do something wrong in code, there are two main types of error that you'll come across: Syntax errors: These...
Read more >What Is Rna-main.js? How To Repair It? [SOLVED]
These rna-main.js problems are generally caused by Adobe Acrobat DC 2015-related file corruption, or in some cases, if the file has been accidentally...
Read more >How to Solve the Chunk Load Error in JavaScript
This can occur when the checksum of the received file does not match the integrity attribute of the script tag. (For more information...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Removing
"outputHashing": "bundles",
from myangular.json
file did solve this issue. Or setting it to"outputHashing": "none",
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.