Repository navigation
Closed
Labels
area: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix
Milestone
Description
🐞 Bug report
Command (mark with an x)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was:I don't know. the tutorial angular 14 especially for a standalone component on youtube shows that the angular-cli is working perfectly.
Description
After run npm i -g @angular/cli@next to trying angular 14 RC, the angular-cli is failed to generate component using ng g component <name-component>
🔬 Minimal Reproduction
I am using windows 10.
- Upgrade angular-cli to 14 rc using
npm i -g @angular/cli@next - Create new project
ng new <name-project> - Generate new component using
ng g component <name-component>
below is the package.json I am currently using.
{
"name": "berdikari",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"watch": "ng build --watch --configuration development",
"test": "ng test",
"dev:ssr": "ng run berdikari:serve-ssr",
"serve:ssr": "node dist/berdikari/server/main.js",
"build:ssr": "ng build && ng run berdikari:server",
"prerender": "ng run berdikari:prerender"
},
"private": true,
"dependencies": {
"@angular/animations": "^14.0.0-rc.0",
"@angular/cdk": "^14.0.0-rc.0",
"@angular/common": "^14.0.0-rc.0",
"@angular/compiler": "^14.0.0-rc.0",
"@angular/core": "^14.0.0-rc.0",
"@angular/forms": "^14.0.0-rc.0",
"@angular/platform-browser": "^14.0.0-rc.0",
"@angular/platform-browser-dynamic": "^14.0.0-rc.0",
"@angular/platform-server": "^14.0.0-rc.0",
"@angular/router": "^14.0.0-rc.0",
"@angular/service-worker": "^14.0.0-rc.0",
"@fortawesome/angular-fontawesome": "^0.10.2",
"@nguniversal/express-engine": "^14.0.0-rc.0",
"@zxing/browser": "^0.0.5",
"@zxing/library": "^0.18.3",
"@zxing/ngx-scanner": "3.1.3",
"angular-oauth2-oidc": "^13.0.1",
"angular-oauth2-oidc-jwks": "^13.0.1",
"aspnet-prerendering": "^3.0.1",
"express": "^4.15.2",
"jwt-decode": "^3.1.2",
"ng-thermal-print": "^1.0.3",
"ngx-image-compress": "^11.0.3",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"uuid": "^8.3.2",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.0.0-rc.0",
"@angular/cli": "~14.0.0-rc.0",
"@angular/compiler-cli": "^14.0.0-rc.0",
"@angular/language-service": "^14.0.0-rc.0",
"@nguniversal/builders": "^14.0.0-rc.0",
"@tailwindcss/aspect-ratio": "^0.4.0",
"@tailwindcss/forms": "^0.5.1",
"@tailwindcss/line-clamp": "^0.4.0",
"@tailwindcss/typography": "^0.5.2",
"@types/express": "^4.17.0",
"@types/jasmine": "~4.0.0",
"@types/node": "^14.15.0",
"@types/uuid": "^8.3.3",
"@types/w3c-web-serial": "^1.0.2",
"@types/w3c-web-usb": "^1.0.5",
"@types/web-bluetooth": "0.0.12",
"autoprefixer": "^10.4.7",
"jasmine-core": "~4.1.0",
"karma": "~6.3.0",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.0.0",
"karma-jasmine-html-reporter": "~1.7.0",
"postcss": "^8.4.13",
"tailwindcss": "^3.0.24",
"tailwindcss-children": "^2.1.0",
"typescript": "~4.6.2"
}
}
🔥 Exception or Error
An unexpected error occurred: {}
🌍 Your Environment
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 14.0.0-rc.0
Node: 16.13.1
Package Manager: npm 8.1.2
OS: win32 x64
Angular: 14.0.0-rc.0
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, platform-browser
... platform-browser-dynamic, platform-server, router
... service-worker
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.0-rc.0
@angular-devkit/build-angular 14.0.0-rc.0
@angular-devkit/core 14.0.0-rc.0
@angular-devkit/schematics 14.0.0-rc.0
@nguniversal/builders 14.0.0-rc.0
@nguniversal/express-engine 14.0.0-rc.0
@schematics/angular 14.0.0-rc.0
rxjs 7.5.5
typescript 4.6.4
Metadata
Metadata
Assignees
Labels
area: @angular/clifreq1: lowOnly reported by a handful of users who observe it rarelyseverity5: regressiontype: bug/fix

Activity
alan-agius4 commentedon May 16, 2022
I'm sorry, but we can't reproduce the problem following the instructions you provided.
Can you setup a minimal repro please?
You can read here why this is needed. A good way to make a minimal repro is to create a new app via
ng new repro-appand adding the minimum possible code to show the problem. Then you can push this repository to github and link it here.This might be related to your directory structure so its really important to get an accurate repro to diagnose this.
dzhavat commentedon May 16, 2022
I just experienced the same error. My repo is here https://github.com/dzhavat/angular-standalone-components
Running
ng versiongives me thiss-triar commentedon May 17, 2022
I repro my repo also here https://github.com/s-triar/repro-ng-14-cli-failed-g-comp
s-triar commentedon May 17, 2022
for some reason.
ng g directive <name-dir>also has the same errorfix(@angular/cli): print schematic errors correctly
fix(@angular/cli): print schematic errors correctly
fix(@angular/cli): print schematic errors correctly
s-triar commentedon May 17, 2022
When I change the file according to f2764c6
it happened because there is more than 1 module.
fix(@angular/cli): print schematic errors correctly
fix(@angular/cli): print schematic errors correctly
angular-automatic-lock-bot commentedon Jun 17, 2022
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.