angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Angular cli error on components in spec file upon ng serve

Open DanPride opened this issue 10 years ago • 4 comments

Mac OSX Yosemite angular-cli: 1.0.0-beta.9 node: 6.3.0 os: darwin x64

Using Angular-cli to create components is generating a consistent error on the .spec files on line 17

//let component = new TodoListComponent() // expect(component).toBeTruthy();

The Broccoli Plugin: [BroccoliTypeScriptCompiler] failed with:

Error: Typescript found the following errors: /Users/dp/thechariot/eggAng1/tmp/broccoli_type_script_compiler-input_base_path-UVT171nw.tmp/0/src/app/todo-list/todo-list.component.spec.ts (20, 1): '}' expected. at BroccoliTypeScriptCompiler._doIncrementalBuild (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:120:19) at BroccoliTypeScriptCompiler.build (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:43:10) at /Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/broccoli-caching-writer/index.js:152:21 at lib$rsvp$$internal$$tryCatch (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16) at lib$rsvp$$internal$$invokeCallback (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17) at lib$rsvp$$internal$$publish (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1019:11) at lib$rsvp$asap$$flush (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9) at _combinedTickCallback (internal/process/next_tick.js:67:7) at process._tickCallback (internal/process/next_tick.js:98:9)

The broccoli plugin was instantiated at: at BroccoliTypeScriptCompiler.Plugin (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/broccoli-plugin/index.js:10:31) at BroccoliTypeScriptCompiler.CachingWriter as constructor at BroccoliTypeScriptCompiler (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/broccoli-typescript.js:27:5) at Angular2App._getTsTree (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/angular2-app.js:329:18) at Angular2App._buildTree (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/angular2-app.js:124:23) at new Angular2App (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/lib/broccoli/angular2-app.js:53:23) at module.exports (/Users/dp/thechariot/eggAng1/angular-cli-build.js:10:10) at Class.module.exports.Task.extend.setupBroccoliBuilder (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/ember-cli/lib/models/builder.js:55:19) at Class.module.exports.Task.extend.init (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/ember-cli/lib/models/builder.js:89:10) at new Class (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/core-object/core-object.js:18:12) at Class.module.exports.Task.extend.run (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/ember-cli/lib/tasks/serve.js:15:19) at /Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/ember-cli/lib/commands/serve.js:64:24 at lib$rsvp$$internal$$tryCatch (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1036:16) at lib$rsvp$$internal$$invokeCallback (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1048:17) at /Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:331:11 at lib$rsvp$asap$$flush (/Users/dp/thechariot/eggAng1/node_modules/angular-cli/node_modules/rsvp/dist/rsvp.js:1198:9)

DanPride avatar Jul 12 '16 22:07 DanPride

Seems like you have a syntax error /src/app/todo-list/todo-list.component.spec.ts (20, 1): '}' expected..

#1455 should make these errors much more readable.

filipesilva avatar Jul 28 '16 03:07 filipesilva

I agree but its not my error, its the code generated by cli  Dan Pride 1-303-800-0900 - Skype No Texting1-360-850-9322 Mobile http://danielpride.com www.linkedin.com/in/danielpride/http://archaeolibrary.com/https://headlessuber.com

  From: Filipe Silva <[email protected]>

To: angular/angular-cli [email protected] Cc: Daniel Pride [email protected]; Author [email protected] Sent: Wednesday, July 27, 2016 8:07 PM Subject: Re: [angular/angular-cli] Angular cli error on components in spec file upon ng serve (#1332)

Closed #1332.— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DanPride avatar Jul 28 '16 15:07 DanPride

Can you show me todo-list.component.spec.ts please?

filipesilva avatar Jul 28 '16 16:07 filipesilva

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.