I have been tasked with adding a feature to an existing Electron/Angular application that has not been worked on for some time. When I try to launch the app in development mode using
ng serve
I encounter the following error message:
Your global Angular CLI version (8.3.23) is higher than your local version (6.0.8). The local version will be used.
To disable this warning, use "ng config -g cli.warnings.versionMismatch false".
** Angular Live Development Server is listening on localhost:4200, open your browser at http://localhost:4200/ **
10% building modules 6/6 modules 0 activei 「wds」: Project running at http://localhost:4200/
i 「wds」: webpack output served from /
i 「wds」: 404s fallback to //index.html
Date: 2020-01-21T17:27:12.816Z
Hash: 9ccbd80f9187de6cbb3f
Time: 4077ms
chunk {main} main.js, main.js.map (main) 355 kB [entry] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 354 kB [entry] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.22 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 513 kB [entry] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.5 kB [initial] [rendered]
WARNING in ./src/styles.scss (./node_modules/raw-loader!./node_modules/postcss-loader/lib??embedded!./node_modules/sass-loader/dist/cjs.js??ref--14-3!./src/styles.sc/styles.scss)
(Emitted value instead of an instance of Error) autoprefixer: D:\Helpful Applications\dispatch-electron\src\styles.scss:24:4: grid-auto-rows is not supported by IE grid-auto-rows is not supported by IE
ERROR in src/environments/environment.prod.ts(1,23): error TS2307: Cannot find module '../../config/http'.
src/environments/environment.ts(5,23): error TS2307: Cannot find module '../../config/http'.
src/environments/environment.ts(6,26): error TS2307: Cannot find module '../../config/http.dev'.
i 「wdm」: Compilation failed.
Within my /config/ directory, there are no directories named http or http.dev, only a file called http.template.js containing the following content:
module.exports = {
authUrl: "",
apiUrl: "",
logUrl: ""
};
The structure of my environment.ts file is as follows:
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.
import * as http from "../../config/http";
import * as devhttp from "../../config/http.dev";
Object.assign(http, devhttp);
export const environment = {
production: false,
http: http
};
/*
* In development mode, to ignore zone related error stack frames such as
* `zone.run`, `zoneDelegate.invokeTask` for easier debugging, you can
* import the following file, but please comment it out in production mode
* because it will have performance impact when throw error
*/
// import 'zone.js/dist/zone-error'; // Included with Angular CLI.
Below is the angular.json file mentioned:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
[...remaining text omitted for brevity...]
}
As I am unfamiliar with this application, any assistance in resolving these issues and setting up a development environment would be greatly appreciated.