Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng build failing with component not found #6163

Closed
rajar-r opened this issue May 3, 2017 · 2 comments
Closed

ng build failing with component not found #6163

rajar-r opened this issue May 3, 2017 · 2 comments

Comments

@rajar-r
Copy link

rajar-r commented May 3, 2017

`

Versions.

@angular/cli: 1.0.1
node: 6.9.5
os: win32 x64
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

Repro steps.

created new ng app

  1. ng new angtest -sd \src\main\app
  2. ng build

fails with below error log

The log given by the failure.

ERROR in D:/../angtest/src/main/app/app/app.component.ts (1,27): Cann
ot find module '@angular/core'.

ERROR in D:/../angtest/src/main/app/app/app.component.ts (8,14): Expe
rimental support for decorators is a feature that is subject to change in a futu
re release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in D:/../angtest/src/main/app/app/app.module.ts (1,31): Cannot
find module '@angular/platform-browser'.

ERROR in D:/../angtest/src/main/app/app/app.module.ts (2,26): Cannot
find module '@angular/core'.

ERROR in D:/../angtest/src/main/app/app/app.module.ts (3,29): Cannot
find module '@angular/forms'.

ERROR in D:/../angtest/src/main/app/app/app.module.ts (4,28): Cannot
find module '@angular/http'.

ERROR in D:/../angtest/src/main/app/app/app.module.ts (20,14): Experi
mental support for decorators is a feature that is subject to change in a future
release. Set the 'experimentalDecorators' option to remove this warning.

ERROR in D:/../angtest/src/main/app/main.ts (1,32): Cannot find modul
e '@angular/core'.

--angular-cli.json file

{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "uds3"
},
"apps": [
{
"root": "src\main\app",
"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\app/tsconfig.app.json"
},
{
"project": "\src\main\app/tsconfig.spec.json"
},
{
"project": "e2e/tsconfig.e2e.json"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}

@rajar-r
Copy link
Author

rajar-r commented May 4, 2017

it is due to forward slash and backward slash resolved the issue, it is my silly mistake
the below command worked.
ng new angtest -sd "src/main/app"

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant