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

update script for deploy #1367

Closed
wants to merge 3 commits into from
Closed

update script for deploy #1367

wants to merge 3 commits into from

Conversation

rajnikantsolarwinds
Copy link

No description provided.

@grossmj
Copy link
Member

grossmj commented Jul 27, 2022

Looks like I still have the problem.

yarn ng build --configuration production
cd dist
npx http-server

@grossmj grossmj linked an issue Jul 28, 2022 that may be closed by this pull request
package.json Outdated
@@ -17,7 +17,7 @@
"start": "ng serve",
"startforelectron": "ng serve --configuration=electronDev",
"build": "ng build",
"buildforproduction": "ng build --source-map=false --configuration=production --base-href /static/web-ui/",
"buildforproduction": "ng build --source-map=false --build-optimizer=false --aot --configuration=production --base-href /static/web-ui/",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this works if the build-optimizer is false however we want is to be activated.

@grossmj
Copy link
Member

grossmj commented Aug 3, 2022

Default values for --build-optimizer and --aot are true: https://angular.io/cli/build however I added them explicitly with still the same result: I get a blank page unless I set --built-optimizer to false

$ yarn ng build --source-map=false --build-optimizer=true --aot=true --configuration=production
yarn run v1.22.19
$ ng build --source-map=false --build-optimizer=true --aot=true --configuration=production
✔ Browser application bundle generation complete.
✔ Copying assets complete.
⠋ Generating index html...1 rules skipped due to selector errors:
  legend+* -> Cannot read properties of undefined (reading 'type')
✔ Index html generation complete.

Initial Chunk Files           | Names                                       |  Raw Size | Estimated Transfer Size
main.ed2a26de59441791.js      | main                                        |   3.55 MB |               610.61 kB
styles.1035ff77d963da68.css   | styles                                      | 372.99 kB |                27.86 kB
polyfills.9fee123abd7f0c0c.js | polyfills                                   |  37.28 kB |                11.68 kB
runtime.337b1c9aa18f212b.js   | runtime                                     |   3.32 kB |                 1.42 kB

                              | Initial Total                               |   3.95 MB |               651.56 kB

Lazy Chunk Files              | Names                                       |  Raw Size | Estimated Transfer Size
465.236319d2dbba2475.js       | topology-summary-topology-summary-component |  13.39 kB |                 3.27 kB

Build at: 2022-08-03T08:55:06.032Z - Hash: 2708240a86d8af13 - Time: 32168ms
Done in 34.70s.

$ cd dist/ 
$ npx http-server
Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings: 
CORS: disabled
Cache: 3600 seconds
Connection Timeout: 120 seconds
Directory Listings: visible
AutoIndex: visible
Serve GZIP Files: false
Serve Brotli Files: false
Default File Extension: none

Available on:
  http://127.0.0.1:8080
  http://192.168.0.12:8080
  http://172.16.252.1:8080
  http://192.168.2.1:8080
Hit CTRL-C to stop the server

[2022-08-03T08:56:16.080Z]  "GET /" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
(node:346555) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated
(Use `node --trace-deprecation ...` to show where the warning was created)
[2022-08-03T08:56:16.140Z]  "GET /runtime.337b1c9aa18f212b.js" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
[2022-08-03T08:56:16.142Z]  "GET /main.ed2a26de59441791.js" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
[2022-08-03T08:56:16.142Z]  "GET /polyfills.9fee123abd7f0c0c.js" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
[2022-08-03T08:56:16.173Z]  "GET /styles.1035ff77d963da68.css" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
[2022-08-03T08:56:16.687Z]  "GET /assets/favicon.ico" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"
[2022-08-03T08:56:18.882Z]  "GET /" "Mozilla/5.0 (Windows NT 10.0; rv:100.0) Gecko/20100101 Firefox/100.0"

@@ -60,7 +61,13 @@
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}],
"optimization": true,
"optimization": {
"scripts": false,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to deactivate the scripts optimization, not sure this is what we should do since it's kinda ignoring to original issue.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello. Implementing the changes here, I verified that running the server and accessing the IP of the host where the Web UI runs, it is not possible to add remote servers. Do you know what can cause this? Grateful!

@grossmj grossmj closed this Feb 1, 2023
@grossmj grossmj deleted the bugfix/1366 branch February 1, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Production deployment
3 participants