'import' keyword is a part of ES6 modules syntax. Node.js doesn't provide native support for ES6 modules (basic support is actually available since Node 8.5, but it's a bit limited
/Users/user/Documents/projects/BroadCloudProvisioning/DesktopDev/Samples/yarnelectron/main.js:3
import Service from './service.js'
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (modul
References:
https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000735104-BUG-ES6-import-from-Unexpected-token-import-
No comments:
Post a Comment