angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.77k stars 11.97k forks source link

Angular cli error on components in spec file upon ng serve #1332

Closed DanPride closed 8 years ago

DanPride commented 8 years ago

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)

filipesilva commented 8 years ago

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.

DanPride commented 8 years ago

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 <notifications@github.com>

To: angular/angular-cli angular-cli@noreply.github.com Cc: Daniel Pride danielpride@yahoo.com; Author author@noreply.github.com 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.

filipesilva commented 8 years ago

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

angular-automatic-lock-bot[bot] commented 5 years ago

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.