Issue with build? (Angular 7)
See original GitHub issueAfter all steps of installation and run application I have an empty ui-jar app on :4200 port. (No components there). I added required comments: @group, @component inside component, and its spec file. Run script again… but nothing changes. I tested multiple versions of ui-jar and find out that only combination:
Angular 6 & ui-jar 1.1.6 & typescript 2.7.2 works OK
I tried different ways to configure with --config and without… this is my package.json
{
"name": "ui-jar-application",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"ui-jar": "node node_modules/ui-jar/dist/bin/cli.js --directory ./src/app/ --includes \\.ts$",
"start-ui-jar-example": "npm run ui-jar && ng serve ui-jar"
},
"private": true,
"dependencies": {
"@angular/animations": "~7.0.0",
"@angular/common": "~7.0.0",
"@angular/compiler": "~7.0.0",
"@angular/core": "~7.0.0",
"@angular/forms": "~7.0.0",
"@angular/http": "~7.0.0",
"@angular/platform-browser": "~7.0.0",
"@angular/platform-browser-dynamic": "~7.0.0",
"@angular/router": "~7.0.0",
"@types/mocha": "^5.2.5",
"core-js": "^2.5.4",
"i": "^0.3.6",
"rxjs": "~6.3.3",
"ui-jar": "^1.1.7",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.10.0",
"@angular/cli": "~7.0.6",
"@angular/compiler-cli": "~7.0.0",
"@angular/language-service": "~7.0.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
}
}
tsconfig.app.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/app",
"module": "es2015",
"types": []
},
"exclude": [
"src/test.ts",
"**/*.spec.ts",
"../../src/**/*.spec.ts"
],
"include": [
"**/*.ts",
"../../src/**/*.ts"
]
}
pic: http://joxi.ru/823dyDgcJkWvLA
ERROR in projects/ui-jar/src/app/app.component.spec.ts(4,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
projects/ui-jar/src/app/app.component.spec.ts(5,3): error TS2304: Cannot find name 'beforeEach'.
projects/ui-jar/src/app/app.component.spec.ts(13,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
projects/ui-jar/src/app/app.component.spec.ts(16,5): error TS2304: Cannot find name 'expect'.
projects/ui-jar/src/app/app.component.spec.ts(19,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
projects/ui-jar/src/app/app.component.spec.ts(22,5): error TS2304: Cannot find name 'expect'.
projects/ui-jar/src/app/app.component.spec.ts(25,3): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
projects/ui-jar/src/app/app.component.spec.ts(29,5): error TS2304: Cannot find name 'expect'.
i 「wdm」: Failed to compile.
Please let me know if smth additional is required. thx
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Identify and Fix Build and Deployment Errors in Your Angular ...
In this guide, you will learn how to spot some of the most common build and deployment errors and how to resolve them...
Read more >npm install fails with NPM 7 #19957 - angular/angular-cli
This bug did not occur a couple of days ago. It doesn't seem like it's caused by a specific CLI version. It might...
Read more >Build Issue With Angular Project while updating Angular 7 to 13
If you use the official angular update website and you put your angular versions From 7.0 To 13.0 you will get the following...
Read more >Angular 7 npm install error due to node-sass, node-gyp ...
How to solve Angular 7 npm install error due to node-sass, node-gyp, python2 in Node v12+ ... Uninstall the problem package: build-angular.
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vigneshikl thanks! It look like you is missing to import “MatCardModule” In your test setup:
TestBed.configureTestingModule({ declarations: [ CardComponent, MyTestComponent ] }).compileComponents();
Make sure to import it like this:
TestBed.configureTestingModule({ imports: [MatCardModule], declarations: [ CardComponent, MyTestComponent ] }).compileComponents();
Does it solve your issue?
Afaik it was related to ui-jar app config… i gave up go use it so… i dont remember all details…