glance icon indicating copy to clipboard operation
glance copied to clipboard

"npm link vtk.js" causes compile failures

Open psavery opened this issue 5 years ago • 4 comments

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...

psavery avatar Dec 04 '19 14:12 psavery

This issue was also confirmed by @floryst

psavery avatar Dec 04 '19 14:12 psavery

I have also experienced this.

thewtex avatar Dec 04 '19 17:12 thewtex

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

dannyrb avatar Dec 04 '19 18:12 dannyrb

Yup my initial investigation surrounds webpack and symlinked deps. Might dig into it later.

floryst avatar Dec 05 '19 00:12 floryst