-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\node_modules\ngx-facebook\dist\esm\providers\facebook.js:1 (function (exports, require, module, __filename, __dirname) { import { Injectable } from '@angular/core'; ^^^^^^ SyntaxError: Unexpected token import #114
Comments
Same problem here when trying to run with angular universal
|
Looks like your bundler/compiler doesn't like ES2015 modules, which means you should be using the UMD module that's in the
|
@ihadeed , I have been working in Angular 4 and after integrate with angular universal and after that I facing this issue. I have commented ngx-facebook component because this plugin also created a problem. Please help me in both cases. Below you find "package.json" file. package.json{ |
You're using ts-node without passing a ts-config.json that has |
@ihadeed, Sorry I am not getting your point. Could you please give any example? tsconfig.json{ |
Reopen the issue if you still have this problem. |
have the same issue. |
I also faced same issue. |
I fixed that issue using import module and service from ngx-facebook/dist/umd instead of ngx-facebook but after that I got another issue.
|
Possible reference: #146 |
ERROR in ./node_modules/ngx-facebook/ivy_ngcc/dist/esm/components/fb-video/fb-video.js 194:12-20 |
\node_modules\ngx-facebook\dist\esm\providers\facebook.js:1
(function (exports, require, module, __filename, __dirname) { import { Injectable } from '@angular/core';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
The text was updated successfully, but these errors were encountered: