ENOENT: no such file or directory, stat 'F:\learning\Material-design\material2-master-latest\material2-master\src\tsconfig.app.json'
Error: ENOENT: no such file or directory, stat 'F:\learning\Material-design\material2-master-latest\material2-master\src\tsconfig.app.json'
at Error (native)
at Object.fs.statSync (fs.js:1000:11)
at AotPlugin._setupOptions (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@ngtools\webpack\src\plugin.js:68:16)
at new AotPlugin (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@ngtools\webpack\src\plugin.js:30:14)
at _createAotPlugin (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@angular\cli\models\webpack-configstypescript.js:5
5:12)
at Object.getNonAotConfig (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@angular\cli\models\webpack-configstypescrip
t.js:72:19)
at NgCliWebpackConfig.buildConfig (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@angular\cli\models\webpack-config.js
:29:37)
at Class.run (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@angular\cli\tasks\serve.js:71:98)
at check_port_1.checkPort.then.port (F:\learning\Material-design\material2-master-latest\material2-master\node_modules\@angular\cli\commands\serve.js:121:
26)
at process._tickCallback (internal/process/next_tick.js:109:7)
Hi, that error means that the fole below cannot be found:
F:\learning\Material-design\material2-master-latest\material2-master\src\tsconfig.app.json
This file is being specified in your .angular-cli.json file. Make sure you have the path right as it's necessary for building the project.
The question is: Why is those file not found in a brand new project created by Angular-CLI? It seems caused by passing a custom source directory:
ng new --source-dir=client xyz
cd xyz
ng serve
Result:
ENOENT: no such file or directory, stat '/home/$user/xyz/client/tsconfig.app.json'
Now trying without custom source-dir, so the command will be ng new xyz, this error doesn't occur. It's noticeable that we've a tsconfig.app.json and tsconfig.spec.json in the src directory, but not in the custom named directory passed by --source-dir. In my point of view, this should be re-opened and threated as a bug. Maybe the ticket-creator can provide more details, if he used this parameter, too.
[user@antergos ~]$ node --version
v8.8.1
[user@antergos ~]$ npm --version
5.5.1
[user@antergos ~]$ ng --version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ â–³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
@angular/cli: 1.4.9
node: 8.8.1
os: linux x64
[user@antergos ~]$ lsb_release -a
LSB Version: 1.4
Distributor ID: Arch
Description: Arch Linux
Release: rolling
Codename: ISO-Rolling
I had this issue… I forgot I was in an Ionic project and ran "ng serve" instead of "ionic serve"
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Hi, that error means that the fole below cannot be found:
This file is being specified in your
.angular-cli.jsonfile. Make sure you have the path right as it's necessary for building the project.