Z
Z
zejkee2019-07-25 12:58:27
Angular
zejkee, 2019-07-25 12:58:27

Starting the project from a non-default url (WDS disconnected, zone.js:3243, et::ERR_NAME_NOT_RESOLVED). Change host and port?

Good afternoon!
I usually deal with problems myself. And now the whole brain is broken. I hope the question is easy for the pros (in fact, I marked it as such).
So - I understand with Angular2. On the local machine on localhost:PORT everything works fine. No errors in console.
In the same way, I raised everything on the VPS - errors are pouring in, the live reboot is turned off.
Pops up a few times

such
client:172 [WDS] Disconnected!
в перемежку с 2-3 десятками:
zone.js:3243 GET localhost:4200/sockjs-node/info?t=1564046952839 net::ERR_NAME_NOT_RESOLVED
zone.js:3243 GET localhost:4200/sockjs-node/info?t=<......................> net::ERR_NAME_NOT_RESOLVED

There was hope that
--public-host= my-host:4200
would help Errors were replaced by
such
zone.js:3243 GET my-host:4200/sockjs-node/info?t=1564046952839 net::ERR_NAME_NOT_RESOLVED
zone.js:3243 GET my-host:4200/sockjs-node/info?t=<......................> net::ERR_NAME_NOT_RESOLVED

At the same time, I didn’t find any other problems except for errors in the console - all the code works, it also connects to the json-server without problems.
My console.log() is interspersed with errors, i.e. everything is working properly.
Tried --disable-host-check and --live-reload false, didn't see any difference.
Now I'm running the project like this
ng serve --open --host my-host --port 4200 --public-host= my-host:4200
Also pop up warnings

] (node:32460) UnhandledPromiseRejectionWarning: Error: Exited with code 3
[0] at ChildProcess.cp.once.code (/root/project/node_modules/opn/index.js:84:13)
[0] at Object.onceWrapper (events.js:273:13)
[0] at ChildProcess.emit (events.js:182:13)
[0] at maybeClose (internal/child_process.js:962:16)
[0] at Socket.stream.socket.on (internal/child_process.js:381:11)
[0] at Socket.emit (events.js:182:13)
[0] at Pipe._handle.close (net.js:606:12)
[0] (node:32460) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[0] (node:32460) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

but it compiles successfully. In their code, all then() are followed by catch().
package ng2-table is installed from a potentially obsolete one (3 years ago last update).
Package versions
├── @angular-devkit/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── UNMET PEER DEPENDENCY @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @angular/[email protected]
├── @fullpage/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── @types/[email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected] - 3
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── UNMET PEER DEPENDENCY [email protected]^1.14.7
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected]
npm ERR! peer dep missing: @angular/[email protected]~2.0.0, required by [email protected]
npm ERR! peer dep missing: @angular/[email protected], required by @angular/[email protected]
npm ERR! peer dep missing: @angular/[email protected]~2.0.0, required by [email protected]
npm ERR! peer dep missing: @angular/[email protected]~2.0.0, required by [email protected]
npm ERR! peer dep missing: @angular/[email protected]~2.0.0, required by [email protected]
npm ERR! peer dep missing: [email protected] - 3, required by [email protected]
npm ERR! peer dep missing: [email protected]^1.14.7, required by [email protected]
npm ERR! peer dep missing: [email protected]~2.4.0 || ~2.5.0 || ~2.6.0 || ~2.7.0, required by @ngtools/[email protected]

UPD: thanks for the spoiler tips.
Axis: Ubuntu 16.04
/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8

/etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu16.04 ubuntu16
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
my-ip... 110740.local
127.0.0.1 110740.local

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question