[英]Error: Failed to transpile program ionic2
ionic cordova build android [WARN]在package.json中檢測到@ ionic / cli-plugin-ionic-angular。
As of CLI 3.8, it is no longer needed. You can uninstall it:
npm uninstall --save-dev --save-exact @ionic/cli-plugin-ionic-a
[INFO] Running app-scripts build: --platform android --target cordova
[15:38:32] build dev started ...
[15:38:32] clean started ...
[15:38:32] clean finished in 1 ms
[15:38:32] copy started ...
[15:38:32] transpile started ...
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 6
Cannot find name 'describe'.
L5: beforeEach(() => {
L6: TestBed.configureTestingModule({
L7: declarations: [
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 7
Cannot find name 'beforeEach'.
L6: TestBed.configureTestingModule({
L7: declarations: [
L8: AppComponent
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 16
Cannot find name 'it'.
L15: const fixture = TestBed.createComponent(AppComponent);
L16: const app = fixture.debugElement.componentInstance;
L17: expect(app).toBeTruthy();
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 19
Cannot find name 'expect'.
L18: }));
L20: it(`should have as title 'app works!'`, async(() => {
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 22
Cannot find name 'it'.
L21: const fixture = TestBed.createComponent(AppComponent);
L22: const app = fixture.debugElement.componentInstance;
L23: expect(app.title).toEqual('app works!');
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 25
Cannot find name 'expect'.
L24: }));
L26: it('should render title in a h1 tag', async(() => {
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 28
Cannot find name 'it'.
L27: const fixture = TestBed.createComponent(AppComponent);
L28: fixture.detectChanges();
L29: const compiled = fixture.debugElement.nativeElement;
[15:38:39] typescript: C:/Users/NATALIA/Pictures/mdp365-ionic3/src/aponent.spec.ts, line: 32
Cannot find name 'expect'.
L31: }));
L32: });
錯誤:無法在C處以新的BuildError(C:\\ Users \\ NATALIA \\ Pictures \\ mdp365-ionic3 \\ node_moic \\ app-scripts \\ dist \\ util \\ errors.js:16:28)在BuildError.Error(本機)處編譯程序:\\ Users \\ NATALIA \\ Pictures \\ mdp365-ionic3 \\ node_modules \\ @ionic \\ appist \\ transpile.js:137:20 at transpileWorker(C:\\ Users \\ NATALIA \\ Pictures \\ mdp365-ionic3 \\ node_mnic \\ app-scripts \\ dist \\在buildProject(C:\\ Usersenter代碼)的Object.transpile(C:\\ Users \\ NATALIA \\ Pictures \\ mdp365-ionic3 \\ node_onic \\ app-scripts \\ dist \\ transpile.js:61:12)處的transpile.js:103:12)此處\\ NATALIA \\圖片\\ mdp365-ionic3 \\ node_modu \\ app-scripts \\ dist \\ build.js:97:78)位於C:\\ Users \\ NATALIA \\ Pictures \\ mdp365-ionic3 \\ node_modules \\ @ionic \\ appist \\ build.js :47:16
所有缺少的成員看上去都與您的測試框架相關(我猜是Jasmine或Jest):
Cannot find name 'describe'.
...
Cannot find name 'it'.
您需要確保:
package.json
等中)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.