Hello,
I can’t get this tutorial to work:
What I want to achieve is use vtk.js from an Angular app.
Let me see if my understanding is correct:
- We need to webpack vtk.js to make it work, right? This is different from wslink that you install it with npm install and you can start working with it, correct?
- I follow the tutorial. When I arrive to webpack config it says:
var entry = path.join(__dirname, ‘./src/index.js’);
do you mean?
var entry = path.join(__dirname, ‘./node_modules/vtk.js/Sources/index.js’);
because we want to webpack vtk.js, not the project I am building, right. To start with, I do not have ‘./src/index.js’ as I am developing an Angular10 app. I have sthg like ./src/main.ts.
-
(cosmetics) there is typo in package.json.It should say --color not --colors
-
After doing above changes, I am ready to build. npm run build. I get a lot of errors:
ERROR in ./node_modules/vtk.js/Sources/Filters/General/PaintFilter/PaintFilter.worker.js
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
ValidationError: Invalid options object. Worker Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property ‘fallback’. These properties are valid:
object { worker?, publicPath?, filename?, chunkFilename?, inline?, esModule? } - options.inline should be one of these:
“no-fallback” | “fallback”
at validate (C:\projects_web\evoker\ng10-client\node_modules\worker-loader\node_modules\schema-utils\dist\validate.js:104:11)
at Object.pitch (C:\projects_web\evoker\ng10-client\node_modules\worker-loader\dist\index.js:59:29)
@ ./node_modules/vtk.js/Sources/Filters/General/PaintFilter/index.js 7:0-94 43:21-38
@ ./node_modules/vtk.js/Sources/Filters/General/index.js 12:0-43 29:2-16
@ ./node_modules/vtk.js/Sources/Filters/index.js 3:0-32 9:2-9
@ ./node_modules/vtk.js/Sources/index.js 2:0-32 13:14-21
ERROR in ./node_modules/vtk.js/Sources/Interaction/Widgets/PiecewiseGaussianWidget/ComputeHistogram.worker.js
Module build failed (from ./node_modules/worker-loader/dist/cjs.js):
ValidationError: Invalid options object. Worker Loader has been initialized using an options object that does not match the API schema.
- options has an unknown property ‘fallback’. These properties are valid:
object { worker?, publicPath?, filename?, chunkFilename?, inline?, esModule? } - options.inline should be one of these:
“no-fallback” | “fallback”
at validate (C:\projects_web\evoker\ng10-client\node_modules\worker-loader\node_modules\schema-utils\dist\validate.js:104:11)
at Object.pitch (C:\projects_web\evoker\ng10-client\node_modules\worker-loader\dist\index.js:59:29)
@ ./node_modules/vtk.js/Sources/Interaction/Widgets/PiecewiseGaussianWidget/index.js 4:0-63 497:25-47
@ ./node_modules/vtk.js/Sources/Proxy/Core/PiecewiseFunctionProxy/index.js 3:0-100 78:8-67
@ ./node_modules/vtk.js/Sources/Proxy/Core/index.js 3:0-65 11:2-27
@ ./node_modules/vtk.js/Sources/Proxy/index.js 1:0-26 4:2-6
@ ./node_modules/vtk.js/Sources/index.js 7:0-31 17:12-20
ERROR in ./node_modules/jszip/lib/readable-stream-browser.js 9:0-34
Can you please help me?
Best,
Francesc