atifsaddique211f / a2-googleplace-autocomplete

Angular 2 google place auto complete, search places using google place library
9 stars 2 forks source link

You may need an appropriate loader to handle this file type. #1

Open ranouf opened 7 years ago

ranouf commented 7 years ago

HI,

I have this error, do you know how to fix it?

ERROR in ./~/angular2-google-place/src/app/app.component.ts
Module parse failed: C:\Users\x\Documents\Visual Studio 2017\Projects\x\x.Web\node_modules\angular2-google-place\src\app\app.component.ts Unexpected character '@' (3:0)
You may need an appropriate loader to handle this file type.
| import {Component} from '@angular/core';
| 
| @Component({
|   selector: 'app-root',
|   templateUrl: './app.component.html',
 @ ./~/angular2-google-place/src/app/index.ts 1:0-32
 @ ./~/angular2-google-place/index.ts
 @ ./ClientApp/app/app.module.shared.ts
 @ ./ClientApp/app/app.module.client.ts
 @ ./ClientApp/boot-client.ts
 @ multi event-source-polyfill webpack-hot-middleware/client?path=%2F__webpack_hmr ./ClientApp/boot-client.ts
ERROR in ./~/angular2-google-place/src/app/app.module.ts
Module parse failed: C:\Users\x\Documents\Visual Studio 2017\Projects\x\x.Web\node_modules\angular2-google-place\src\app\app.module.ts Unexpected character '@' (9:0)
You may need an appropriate loader to handle this file type.
| import {GoogleplaceDirective} from "./directives/google-place.directive";
| 
| @NgModule({
|   declarations: [
|     AppComponent, GoogleplaceDirective
 @ ./~/angular2-google-place/src/app/index.ts 2:0-29
 @ ./~/angular2-google-place/index.ts
 @ ./ClientApp/app/app.module.shared.ts
 @ ./ClientApp/app/app.module.client.ts
 @ ./ClientApp/boot-client.ts
 @ multi event-source-polyfill webpack-hot-middleware/client?path=%2F__webpack_hmr ./ClientApp/boot-client.ts

here is my package.json:

{
  "name": "X.Web",
  "version": "0.0.0",
  "dependencies": {
    "@agm/core": "1.0.0-beta.0",
    "@angular/animations": "^4.2.0",
    "@angular/common": "^4.2.0",
    "@angular/compiler": "^4.2.0",
    "@angular/core": "^4.2.0",
    "@angular/flex-layout": "2.0.0-beta.8",
    "@angular/forms": "^4.2.0",
    "@angular/http": "^4.2.0",
    "@angular/material": "2.0.0-beta.6",
    "@angular/platform-browser": "^4.2.0",
    "@angular/platform-browser-dynamic": "^4.2.0",
    "@angular/platform-server": "^4.2.0",
    "@angular/router": "^4.2.0",
    "@covalent/core": "^1.0.0-beta.5-1",
    "@ngx-translate/core": "7.0.0",
    "@ngx-translate/http-loader": "0.1.0",
    "@swimlane/ngx-charts": "5.3.1",
    "@types/node": "7.0.18",
    "angular2-google-place": "^2.0.2",
    "angular2-jwt": "^0.2.3",
    "angular2-template-loader": "0.6.2",
    "aspnet-prerendering": "^2.0.5",
    "aspnet-webpack": "^1.0.29",
    "auth0-js": "^8.7.0",
    "auth0-lock": "^10.16.0",
    "awesome-typescript-loader": "3.1.3",
    "core-js": "^2.4.1",
    "css": "2.2.1",
    "css-loader": "0.28.1",
    "d3": "^4.4.0",
    "es6-shim": "0.35.3",
    "event-source-polyfill": "0.0.9",
    "expose-loader": "0.7.3",
    "extract-text-webpack-plugin": "2.1.0",
    "file-loader": "0.11.1",
    "hammerjs": "^2.0.8",
    "highlight.js": "9.11.0",
    "html-loader": "0.4.5",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "json-loader": "0.5.4",
    "node-sass": "^4.5.3",
    "preboot": "4.5.2",
    "raw-loader": "^0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "^5.2.0",
    "sass-loader": "^6.0.5",
    "showdown": "1.6.4",
    "style-loader": "0.17.0",
    "to-string-loader": "1.1.5",
    "typescript": "2.3.2",
    "url-loader": "0.5.8",
    "web-animations-js": "2.2.5",
    "webpack": "2.5.1",
    "webpack-hot-middleware": "2.18.0",
    "webpack-merge": "4.1.0",
    "zone.js": "^0.8.12"
  },
  "devDependencies": {
    "@types/chai": "3.5.2",
    "@types/jasmine": "2.5.47",
    "@types/hammerjs": "^2.0.34",
    "chai": "3.5.0",
    "jasmine-core": "2.6.1",
    "karma": "1.7.0",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "2.1.1",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.1.0",
    "karma-webpack": "2.0.3",
    "node-sass": "4.5.3"
  }
}

Thanks

atifsaddique211f commented 7 years ago

How can I reproduce the issue? Please provide more details.