Upon transferring my Angular project from my local computer to a Linux server, I attempted to launch the project using ng serve
but encountered an issue where it opened a new file in the console editor instead.
After some investigation, I tried running npm start
but that also proved unsuccessful, presenting me with the following error:
Cannot read property 'config' of null
TypeError: Cannot read property 'config' of null
at Class.run (/var/www/html/node1/social2/client/node_modules/angular-cli/tasks/serve.js:22:61)
at /var/www/html/node1/social2/client/node_modules/angular-cli/commands/serve.run.js:22:22
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `start http://xxx.xx.xx.xx:4200 & ng serve -port 4200`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-01-23T18_49_07_743Z-debug.log
I have verified that the .angular-cli.json
file is present and accounted for.
What could possibly be causing this issue? Any suggestions for a solution?