glance
glance copied to clipboard
"npm link vtk.js" causes compile failures
For some reason, it looks like webpack is having some big issues compiling paraview glance if there is a soft link to a local vtk.js. You end up getting compile errors such as:
Error resolving webpackConfig Error: Cannot find module '/home/patrick/src/vtk-js/build/webpack.dev.config.js'`
And lots of module not found errors such as:
ERROR in ../vtk-js/Sources/Proxy/Representations/GlyphRepresentationProxy/index.js
Module not found: Error: Can't resolve 'vtk.js/Sources/vtk' in '/home/patrick/src/vtk-js/Sources/Proxy/Representations/GlyphRepresentationProxy'
Strangely enough, if you recursively copy the local vtk.js
directory into node_modules
instead of creating a soft link, there are no issues. So it seems to be an issue only with soft linking...
This issue was also confirmed by @floryst
I have also experienced this.
We experience this issue in our own project (react-vtkjs-viewport
) when attempting this as well. I assumed it was related to how WebPack treats symlinked dependencies. We haven't investigated the issue thoroughly -- just making note.
CC: @jamesapetts
Yup my initial investigation surrounds webpack and symlinked deps. Might dig into it later.