[vtkusers] vtk.js issue with the ES6 example

smurphy sebastien.murphy at gmail.com
Thu Jun 14 05:38:51 EDT 2018


Hello,

I am having issues with running the vtk.js example from
https://kitware.github.io/vtk-js/docs/intro_vtk_as_es6_dependency.html.

I did exactly as instructed (at least I believe I did and cross-checked many
times).

when running 
>npm run build 
I get the following error

ERROR in
./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl
Module parse failed: Unexpected token (18:10)
You may need an appropriate loader to handle this file type.

The entire output until this error is copied below. I also attach the
webpack.config.js file.

Tried searching online and in the forum but can't find any solutions to this
specific problem.

Thanks,
Sebastien

> mywebproject at 1.0.0 build ~/VTK/Web/MyWebProject
> webpack

Hash: a6f352cb63b054c23d33
Version: webpack 4.8.3
Time: 1959ms
Built at: 2018-06-14 11:29:58
 1 asset
Entrypoint main = main.js
 [2] (webpack)/buildin/amd-define.js 88 bytes {0} [built]
 [4] (webpack)/buildin/amd-options.js 82 bytes {0} [built]
 [5] (webpack)/buildin/module.js 519 bytes {0} [built]
 [6] (webpack)/buildin/global.js 509 bytes {0} [built]
[10] ./src/controller.html 158 bytes {0} [built] [failed] [1 error]
[20] ./src/index.js + 98 modules 904 KiB {0} [built]
     | ./src/index.js 2.59 KiB [built]
     |     + 98 hidden modules
[21] crypto (ignored) 15 bytes {0} [optional] [built]
    + 25 hidden modules

WARNING in ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js
1293:25-47 "export 'default' (imported as 'ComputeGradientsWorker') was not
found in './ComputeGradients.worker'
 @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/Texture/index.js
 @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/ViewNodeFactory/index.js
 @ ./node_modules/vtk.js/Sources/Rendering/OpenGL/RenderWindow/index.js
 @
./node_modules/vtk.js/Sources/Rendering/Misc/FullScreenRenderWindow/index.js
 @ ./src/index.js

WARNING in configuration
The 'mode' option has not been set, webpack will fallback to 'production'
for this value. Set 'mode' option to 'development' or 'production' to enable
defaults for each environment.
You can also set it to 'none' to disable any default behavior. Learn more:
https://webpack.js.org/concepts/mode/

ERROR in
./node_modules/vtk.js/Sources/Rendering/OpenGL/glsl/vtkVolumeVS.glsl
Module parse failed: Unexpected token (18:10)
You may need an appropriate loader to handle this file type.
|
=========================================================================*/



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list