After migrating to Angular 13, ng build and ng build --prod renders blank page - angular13

ng serve works perfectly fine.
But ng build & ng build --configuration=production renders blank page without any errors in console.

Related

Blank Page when run build

I'm trying to deploy a project so I did an npm run build and after it to check it I did serve -s build.
but when I'm checking the building one I get a blank page but in the regular project(not build), it is working fine.
I tried to see if its a problem of routing but didn't found.
Repo
I deployed it anyway so you can see.
Deploy of blank Page
In Package.json
Replace from
"homepage": "http://ethanolle.github.io/coca-cola"
to
"homepage": "."

Nextjs with sass styling throws error only in first run after npm run dev

Using nextjs with sass styling shows weird error on only first run after running npm run dev. after refreshing page or going back and forward with links in my pages works fine.
error which i get is " cannot read property 'call' of undefined".
if i run project with npm run build then npm start (production mode) works fine too.

index.html from create-react-app build doesn't work in web browser

I'm using create-react-app.
The react application works well by npm start.
But...
I ran npm run build then index.html and main...js/main...css were create in build directory.
And moved this files into tomcat web application's home directory.
When I open the index.html in the browser, blank screen only shown.
What's the problem ?
(I added "homepage" : "." into package.json, so this isn't 404 problem)

How to build the yeoman "angular-generator" app in production?

I created my angular application with "yeoman" using "yo angular" with grunt sass bootstrap.
But with node_mudules bower_component and all dev feature the empty project is 200mo sized
How can I build my application for production, include minify css/js and keep only used and required dependance.
EDIT
I don't understand the -1, thousand people use the angular-generator from yeoman and I can't find a build tutorial for this specific generator.
grunt build seems to work but the website is not displaying well.
grunt serve:dist build and run on serve but same problem as grunt build
The dev application ( it s just yo angular empty project )
After grunt serve, it works and i can navigate
After grunt serve:dist, it doesn't work and i can't navigate, it seems like "bower_components" are not build well
if you are using grunt do: "grunt build" or "grunt serve:dist", after the build you will get a dist folder, everything inside is you production app included minify css/js, you don't need anymore. And specify that for unknow reason "yo angular" add jquery to "devDependencies" but not in "dependencies"
in bower.json in you project.
You do not need to deploy everything from your project folder. Hope it help.
You do not need to deploy everything from your project folder. You can find info on this page.
Only files which you include/import in your index.html or css ( images or fonts ), are being used and tracked. Rest are all useless after deployment.
run gulp --production. firts it will clean dist folder (if exist) then move the minified and uglified file there.

How do I start an Angular JS app in WebStorm?

Usually I just type "npm start" to run an Angular JS app for testing. How do I set up a run configuration in WebStorm to do this? I don't see a way to run npm, or enter the "npm start" command from within the run configuration dialog. (Win 7 / Webstorm 9).
you can use Node.js Run configuration for this:
Working dir: /path/to/your/package.json
JavaScript file: /path/to/global/node_modules/npm/bin/npm-cli.js
Application parameters: run start

Resources