Skip to content
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

Issue while running server .js : SyntaxError: Unexpected token import #357

Closed
jainnitesh opened this issue Mar 11, 2022 · 2 comments
Closed

Comments

@jainnitesh
Copy link

I am getting this issue while running the server.js file

[root@localhost iframely]# node server.js
/opt/iframely/server.js:1
(function (exports, require, module, __filename, __dirname) { import * as sysUtils from './utils.js';
^^^^^^

SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:617:28)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)
at startup (bootstrap_node.js:204:16)
at bootstrap_node.js:625:3

[root@localhost iframely]# node -v
v8.17.0

Pls let me know on this

@nleush
Copy link
Member

nleush commented Mar 11, 2022

Starting from version 2.0.0 Iframely is a module with imports. Only Node.js v.12 or higher is supported.

For details see: #350

@nleush nleush closed this as completed Mar 11, 2022
@jainnitesh
Copy link
Author

Thanks this worked.

I think the documentation should be updated for the same as this is saying highest supported version is 12 which i earlier tried as well.

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

No branches or pull requests

2 participants