Hello all I am trying to upgrade project from angular 5 to angular 6 I am getting following error on ng serve, can any one suggest where it is going wrong
i tried deleting node module and
npm i
Cache clear.
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'child_process' in ‘…/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'fs' in '/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'http' in '/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/xmlhttprequest/lib/XMLHttpRequest.js
Module not found: Error: Can't resolve 'https' in ‘/node_modules/xmlhttprequest/lib'
ERROR in ./node_modules/@maps/mapkit/src/js/localizer.js
Module not found: Error: Can't resolve 'path' in '/node_modules/@maps/mapkit/src/js'.
following is my package.json
"private": true,
"dependencies": {
"@angular/animations": "^6.1.10",
"@angular/cdk": "^6.1.0",
"@angular/common": "^6.1.10",
"@angular/compiler": "^6.1.10",
"@angular/core": "^6.1.10",
"@angular/forms": "^6.1.10",
"@angular/http": "^6.1.10",
"@angular/material": "^6.4.7",
"@angular/platform-browser": "^6.1.10",
"@angular/platform-browser-dynamic": "^6.1.10",
"@angular/platform-server": "^6.1.10",
"@angular/router": "^6.1.10",
"@ckeditor/ckeditor5-build-classic": "^11.0.1",
"@maps/mapkit": "^4.11.3",
"angular-6-datatable": "^0.8.0",
"angular2-datetimepicker": "^1.1.1",
"angular2-json2csv": "^1.1.2",
"angular2-multiselect-dropdown": "^1.2.4",
"bootstrap": "^3.3.7",
"ckeditor4-angular": "^0.1.0",
"core-js": "^2.4.1",
"install": "^0.12.1",
"jquery": "^3.2.1",
"json-2-csv": "^2.1.1",
"json2csv": "^3.11.2",
"line-reader": "^0.4.0",
"md2": "0.0.33",
"mydatepicker": "^2.6.6",
"mydaterangepicker": "^4.2.1",
"ng-idle": "^1.3.2",
"ng2-select": "^2.0.0",
"ng2-select2": "^1.0.0-beta.16",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.3.3",
"rxjs-tslint": "^0.1.8",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.8.9",
"@angular/cli": "^6.2.9",
"@angular/compiler-cli": "^6.1.10",
"@angular/language-service": "^6.1.10",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "^6.0.116",
"codelyzer": "~3.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.0.4",
"tslint": "~5.3.2",
"typescript": "^2.8.3"
},
"browser": {
"child_process": false,
"fs": false,
"http": false,
"https": false,
"fork": false
},
"node": {
"child_process": "empty",
"fs": "empty",
"fork": false
}
}
following is my environment
Angular CLI: 6.2.9
Node: 12.19.0
OS: darwin x64
Angular: 6.1.10
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.8.9
@angular-devkit/build-angular 0.8.9
@angular-devkit/build-optimizer 0.8.9
@angular-devkit/build-webpack 0.8.9
@angular-devkit/core 0.8.9
@angular-devkit/schematics 0.8.9
@angular/cdk 6.4.7
@angular/cli 6.2.9
@angular/material 6.4.7
@ngtools/webpack 6.2.9
@schematics/angular 0.8.9
@schematics/update 0.8.9
rxjs 6.3.3
typescript 2.9.2
webpack 4.16.4