You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently trying to make an Electron app which will visualize data with vtk.js. But I have encountered a problem with importing vtk.js into my app. The exact error I am receiving, when using require('vtk.js'), is this:
D:\electron-quick-start\node_modules\vtk.js\Sources\index.js:1
(function (exports, require, module, __filename, __dirname, process, global) { import Common from './Common';
^^^^^^
SyntaxError: Unexpected token import
at Object.exports.runInThisContext (vm.js:76:16)
at Module._compile (module.js:528:28)
at Object.Module._extensions..js (module.js:565:10)
at Module.load (module.js:473:32)
at tryModuleLoad (module.js:432:12)
at Function.Module._load (module.js:424:3)
at Module.require (module.js:483:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (D:\electron-quick-start\main.js:10:13)
at Module._compile (module.js:556:32)
So my question is - is it possible to use Electron and vtk.js together? I've tried using require('vtk') (Error: Cannot find module 'vtk'), import * from 'vtk' (SyntaxError: Unexpected token import) but nothing seems to work. I am able to run an Electron app and create Web app with vtk.js using Webpack so I don't think that there's something wrong with either of them.
The text was updated successfully, but these errors were encountered:
I am currently trying to make an Electron app which will visualize data with vtk.js. But I have encountered a problem with importing vtk.js into my app. The exact error I am receiving, when using
require('vtk.js')
, is this:So my question is - is it possible to use Electron and vtk.js together? I've tried using
require('vtk')
(Error: Cannot find module 'vtk'
),import * from 'vtk'
(SyntaxError: Unexpected token import
) but nothing seems to work. I am able to run an Electron app and create Web app with vtk.js using Webpack so I don't think that there's something wrong with either of them.The text was updated successfully, but these errors were encountered: