I download this github repository https://github.com/michaschwab/superzoom, then run the command npm i, then src/environments/environment.ts. With start the project i have an error Cannot read property 'config' of null. Please, help me, what i need to do?
Asked
Active
Viewed 86 times
1 Answers
0
TL;DR;
At the root of the project, add a file .angular-cli.json
which contains :
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "my-app"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
This issue is related to angular. Why this error happens ? Check here : https://github.com/angular/quickstart/issues/525. How to resolve the issue ? Check here : How to generate .angular-cli.json file in Angular Cli?

Julien Barrois
- 151
- 9