Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

"@agm/core" Unexpected token import #631

Open
Appjak34 opened this issue Aug 26, 2018 · 3 comments
Open

"@agm/core" Unexpected token import #631

Appjak34 opened this issue Aug 26, 2018 · 3 comments

Comments

@Appjak34
Copy link

Error to load "@agm/core"

/Users/appjak34/Documents/GrupoR28/node_modules/@agm/core/directives/marker.js:1

(function (exports, require, module, __filename, __dirname) { import { Directive, EventEmitter, ContentChildren, QueryList, Input, Output } from '@angular/core';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.@agm/core/directives/marker (/Users/appjak34/Documents/GrupoR28/dist/server/main.js:5588:18)

@uNmAnNeR
Copy link

Same issue here uNmAnNeR/imaskjs#115
something wrong with build config?

@Gorniv
Copy link

Gorniv commented Dec 14, 2018

you need use webpack for the build server.js like in https://github.com/Angular-RU/angular-universal-starter

@sioux-hockey
Copy link

sioux-hockey commented Mar 30, 2019

I am experiencing a similar issue and adding the webpack did not solve the problem.

C:\Users\redacted\Dev\redacted\node_modules\@agm\core\services\managers\info-window-manager.js:1
(function (exports, require, module, __filename, __dirname) { import { Observable } from 'rxjs';
                                                                     ^

SyntaxError: Unexpected token {
    at new Script (vm.js:80:7)
    at createScript (vm.js:274:10)
    at Object.runInThisContext (vm.js:326:10)
    at Module._compile (internal/modules/cjs/loader.js:664:28)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants