Hello i have just updated the angular-cli on my project following the steps on this link. <a class="postlink" href="https://github.com/angular/angular-cli">https://github.com/angular/angular-cli</a> Both in local package and global package. But when i try to use "npm start" now it gives me the error below. What did i do wrong? and how can i fix it?
Environment configuration does not contain "environmentSource" entry.
A new environmentSource entry replaces the previous source entry inside environments.
To migrate angular-cli.json follow the example below:
Before:
"environments": {
"source": "environments/environment.ts",
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
After:
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `ng serve --host 0.0.0.0 --port 4200 --live-reload-port 4201`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'ng serve --host 0.0.0.0 --port 4200 --live-reload-port 4201'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the abp-zero-template package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! ng serve --host 0.0.0.0 --port 4200 --live-reload-port 4201
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs abp-zero-template
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls abp-zero-template
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! D:\dev\vs\dotnetcore\MagicInfoConfig\Server.UI\npm-debug.log
3 Answer(s)
-
0
I rolled back and it's working now but when i try to build the application with "ng build --prod" it gives me an error.
ERROR in Cannot determine the module for class UploadGroupFileModalComponent in D:/dev/vs/dotnetcore/MagicInfoConfig/Server.UI/src/app/main/screens/upload-group- file-modal.component.ts! ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/root.module.ngfactory' in 'D:\dev\vs\dotnetcore\MagicInfoConfig\Server.UI\src' @ ./src/main.ts 8:0-72 @ multi ./src/main.ts
I think this is sth with aot compilation. Cause when i disable aot it is working fine. What can i do to fix the problem any ideas?
-
0
Ok i have found the problem. I was having a temp folder to test and copy paste the classes to try so aot was also looking at those folders when do the compilation. Since they are not inside of any module i use, i am getting the error. I have deleted that folder and problem is solved.
-
0
Thanks :)