shy2net / nemex-angular2-tooltip

An advanced yet simple and highly customizable Angular 2+ tooltip
http://byshynet.com
1 stars 0 forks source link

Module parse failed: Unexpected character '@' #1

Open mikila85 opened 6 years ago

mikila85 commented 6 years ago

(angular 5) after adding with yarn my weback is failing with:

ERROR in ./node_modules/nemex-angular2-tooltip/src/tooltip.directive.ts
Module parse failed: Unexpected character '@' (10:0)
You may need an appropriate loader to handle this file type.
| import * as util from './utils';
|
| @Directive({
|   selector: '[tooltip]',
|   host: {
 @ ./node_modules/nemex-angular2-tooltip/index.ts 3:0-59
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.js

ERROR in ./node_modules/nemex-angular2-tooltip/src/tooltip-arrow.component.ts
Module parse failed: Unexpected character '@' (4:0)
You may need an appropriate loader to handle this file type.
| import { TooltipService } from './nemex-tooltip.service';
|
| @Component({
|     selector: 'tooltip-arrow',
|     template: `<div *ngIf="orientation == 'up'" class="tooltip-arrow-up">
 @ ./node_modules/nemex-angular2-tooltip/index.ts 5:0-70
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.js

ERROR in ./node_modules/nemex-angular2-tooltip/src/nemex-tooltip.service.ts
Module parse failed: Unexpected character '@' (6:0)
You may need an appropriate loader to handle this file type.
| import { TooltipDirective } from './tooltip.directive';
|
| @Injectable()
| export class TooltipService {
|   @Output() public onTooltipShow = new EventEmitter<TooltipDirective>();
 @ ./node_modules/nemex-angular2-tooltip/index.ts 2:0-61
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.js

ERROR in ./node_modules/nemex-angular2-tooltip/src/tooltip.component.ts
Module parse failed: Unexpected character '@' (7:0)
You may need an appropriate loader to handle this file type.
| import { DOCUMENT } from '@angular/platform-browser';
|
| @Component({
|     selector: 'tooltip',
|     template: `<div class="tooltip"
 @ ./node_modules/nemex-angular2-tooltip/index.ts 4:0-59
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.js

ERROR in ./node_modules/nemex-angular2-tooltip/src/nemex-tooltip.module.ts
Module parse failed: Unexpected character '@' (8:0)
You may need an appropriate loader to handle this file type.
| import { TooltipService } from './nemex-tooltip.service';
|
| @NgModule({
|     imports: [CommonModule],
|     declarations: [TooltipDirective, TooltipArrowComponent, TooltipComponent],
 @ ./node_modules/nemex-angular2-tooltip/index.ts 1:0-64
 @ ./src/app/app.module.ts
 @ ./src/main.ts
 @ ./src/index.js
 @ multi (webpack)-dev-server/client?http://localhost:9000 ./src/index.js
shy2net commented 6 years ago

Which angular version are you using? Can you show me your package.json? Looks more like a webpack issue to me but maybe I'm wrong.