-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Bug Report or Feature Request (mark with an x
)
- [x ] bug report
- [ ] feature request
Versions.
Angular CLI: 1.5.0
Node: 7.7.2
OS: win32 x64
Angular: 5.0.1
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.0
@ angular-devkit/build-optimizer: 0.0.32
@ angular-devkit/core: 0.0.20
@ angular-devkit/schematics: 0.0.35
@ ngtools/json-schema: 1.1.0
@ ngtools/webpack: 1.8.0
@ schematics/angular: 0.1.2
typescript: 2.4.2
webpack: 3.8.1
Windows 7
Repro steps.
ng new testNg -sd=src/main/webapp/
ng serve
The log given by the failure.
D:\Shyam\Workspace\testNg>ng serve
ENOENT: no such file or directory, stat 'D:\Shyam\Workspace\testNg\src\main\webapp\tsconfig.app.json'
Error: ENOENT: no such file or directory, stat 'D:\Shyam\Workspace\testNg\src\main\webapp\tsconfig.app.json'
at Object.fs.statSync (fs.js:967:11)
at AngularCompilerPlugin._setupOptions (D:\Shyam\Workspace\testNg\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:78:16)
at new AngularCompilerPlugin (D:\Shyam\Workspace\testNg\node_modules@ngtools\webpack\src\angular_compiler_plugin.js:43:14)
at _createAotPlugin (D:\Shyam\Workspace\testNg\node_modules@angular\cli\models\webpack-configs\typescript.js:77:16)
at Object.getNonAotConfig (D:\Shyam\Workspace\testNg\node_modules@angular\cli\models\webpack-configs\typescript.js:100:19)
at NgCliWebpackConfig.buildConfig (D:\Shyam\Workspace\testNg\node_modules@angular\cli\models\webpack-config.js:33:37)
at Class.run (D:\Shyam\Workspace\testNg\node_modules@angular\cli\tasks\serve.js:71:98)
at check_port_1.checkPort.then.port (D:\Shyam\Workspace\testNg\node_modules@angular\cli\commands\serve.js:123:26)
at process._tickCallback (internal/process/next_tick.js:109:7)
Desired functionality.
ng serve should run the without errors.
Mention any other details that might be useful.
Only the app module is generated within the specified source-directory (ng new testNg -sd=src/main/webapp/) , other files such as tsconfig** files and others are generated within default src directory. The generated .angular-cli.json settings are not helping with these changes.
log when generating the app:
D:\Shyam\Workspace>ng new testNg -sd=src/main/webapp/
create testNg/e2e/app.e2e-spec.ts (289 bytes)
create testNg/e2e/app.po.ts (208 bytes)
create testNg/e2e/tsconfig.e2e.json (235 bytes)
create testNg/karma.conf.js (923 bytes)
create testNg/package.json (1312 bytes)
create testNg/protractor.conf.js (722 bytes)
create testNg/README.md (1022 bytes)
create testNg/tsconfig.json (363 bytes)
create testNg/tslint.json (2985 bytes)
create testNg/.angular-cli.json (1281 bytes)
create testNg/.editorconfig (245 bytes)
create testNg/.gitignore (516 bytes)
create testNg/src/assets/.gitkeep (0 bytes)
create testNg/src/environments/environment.prod.ts (51 bytes)
create testNg/src/environments/environment.ts (387 bytes)
create testNg/src/favicon.ico (5430 bytes)
create testNg/src/index.html (293 bytes)
create testNg/src/main.ts (370 bytes)
create testNg/src/polyfills.ts (2667 bytes)
create testNg/src/styles.css (80 bytes)
create testNg/src/test.ts (1085 bytes)
create testNg/src/tsconfig.app.json (211 bytes)
create testNg/src/tsconfig.spec.json (304 bytes)
create testNg/src/typings.d.ts (104 bytes)
create testNg/src/main/webapp/app/app.module.ts (316 bytes)
create testNg/src/main/webapp/app/app.component.html (1120 bytes)
create testNg/src/main/webapp/app/app.component.spec.ts (986 bytes)
create testNg/src/main/webapp/app/app.component.ts (207 bytes)
create testNg/src/main/webapp/app/app.component.css (0 bytes)
Installing packages for tooling via yarn.
Installed packages for tooling via yarn.
Successfully initialized git.
Project 'testNg' successfully created.
The .angular-cli.json contents:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "test-ng"
},
"apps": [
{
"root": "src/main/webapp/",
"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/main/webapp//tsconfig.app.json",
"exclude": "/node_modules/"
},
{
"project": "src/main/webapp//tsconfig.spec.json",
"exclude": "/node_modules/"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "/node_modules/"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}