Kitware / web-project-templates

This repository try to gather various web project templates based on vue, vtk.js, paraviewweb...
26 stars 10 forks source link

Dependency installation issues with newer versions of nodejs/npm #22

Closed jcohen02 closed 3 years ago

jcohen02 commented 3 years ago

Hi,

Thanks for providing these project templates. Would it be possible to add something to the README regarding supported versions of npm/nodejs for these examples?

Running on macOS 10.15 and using npm6 installed via macports, npm6 depends on nodejs15 and there are some dependencies in the tree when trying to run npm install that don't support more recent versions of nodejs.

After spending quite some time trying to resolve the dependency issues by editing the package lock file, I gave up and downgraded to the macports versions of nodejs10 and npm5 and the installation of dependencies then runs successfully. Apologies if there is some information either in the README or elsewhere covering this that I've missed.

(This relates to vue-vtkjs-pvw-template but I suspect the same issue is present with vue-vtkjs-template)

The main issues in the dependency tree seem to be the use of fsevents versions < 2 which generates the warning:

fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.

...followed by various errors from node-gyp.

I think fsevents only applies on macOS (?) so maybe this is not presenting an issue for users on other platforms. Either way, if a note could be added to save others getting caught with this, that would be great - happy to provide a PR if that would help.

Alternatively maybe it would be possible to update the dependency versions to resolve this and provide support for more recent nodejs versions? Thanks.

jourdain commented 3 years ago

Thanks for reporting such issue. On my side, I tend to use nvm, that way I can easily switch from one version of node to another.

We'll see what can be done to streamline such process.

jourdain commented 3 years ago

Following the readme also show you how the project was built. Doing it again from scratch using the latest tool should have solved your issue. The main goal of that project is really to show how to organize your code and how to leverage vtk.js/pvw inside a Vue based application.

I'm in the process of updating the dependencies to catch up with the runtime/build tools incompatibility.