Issue
I am getting the following when I try to run ng serve --open
PS C:\Code\atd> ng serve --open
⠋ Generating browser application bundles (phase: setup)...C:\Code\atd\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js:79
const address = devServer.server.address();
^
TypeError: Cannot read properties of undefined (reading 'address')
at C:\Code\atd\node_modules\@angular-devkit\build-webpack\src\webpack-dev-server\index.js:79:46
PS C:\Code\atd>
I have googled to no avail.
I have deleted node_modules and run npm install.
ng build runs and builds fine.
I am befuddled.
Does anyone know why this error might suddenly appear?
EDIT: Adding my package.json:
{
"name": "angular-for-rank-beginners",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve --ssl true --ssl-key /node_modules/browser-sync/lib/server/certs/server.key --ssl-cert /node_modules/browser-sync/lib/server/certs/server.crt",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"scully": "scully",
"scully:serve": "scully serve"
},
"private": true,
"dependencies": {
"@angular/animations": "^13.0.0",
"@angular/cdk": "^13.0.0",
"@angular/common": "^13.0.0",
"@angular/compiler": "^13.0.0",
"@angular/core": "^13.0.0",
"@angular/forms": "^13.0.0",
"@angular/material": "^13.0.0",
"@angular/platform-browser": "^13.0.0",
"@angular/platform-browser-dynamic": "^13.0.0",
"@angular/router": "^13.0.0",
"@ngrx/store": "^12.5.1",
"acorn": "^8.5.0",
"core-js": "^3.19.1",
"npm-merge-driver": "^2.3.5",
"rxjs": "^6.6.7",
"tslib": "^2.0.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^13.0.1",
"@angular/cli": "^13.0.1",
"@angular/compiler-cli": "^13.0.0",
"@angular/language-service": "^13.0.0",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "^2.0.10",
"@types/node": "^13.13.52",
"codelyzer": "^6.0.0",
"protractor": "~7.0.0",
"ts-node": "~8.6.2",
"typescript": "^4.3.5"
}
}
Solution
Most probably an issue with SSL. For me it was the pass phrase in the SSL key.
Answered By - MumiaIrrequieta
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.