kbss-cvut / s-pipes-editor-ui

MIT License
0 stars 0 forks source link

Upgrade S-pipes-editor to Latest Node Version and Update Dependencies #43

Closed palagdan closed 1 month ago

palagdan commented 1 month ago

Update the S-pipes-editor project to the latest version of Node.js and ensure all dependencies are also updated to their compatible versions.

palagdan commented 1 month ago

@blcham

The problem was with "webpack-dev-server".

> react-starter-boilerplate-hmr@1.0.0 dev
> webpack-dev-server --env.env=dev

The command moved into a separate package: @webpack-cli/serve
Would you like to install serve? (That will run npm install -D @webpack-cli/serve) (yes/NO) : 

The command has been moved to a different package, @webpack-cli/serve. I installed this package with a version compatible with Webpack 4, but it was not compatible with webpack-cli 3. Therefore, I upgraded webpack-cli to version 4 without any issues.

Next, the command syntax was updated:

webpack-dev-server --env.env=dev -> webpack-dev-server --env env=dev

This change is according to this Stack Overflow post.

Another issue is that upgrading to Webpack 5 is not possible due to the flow-webpack-plugin. The last update of this plugin was 7 years ago, and it uses an outdated Webpack API. It will need to be refactored out.

I tried running it with Node.js 18.20.4, and it works!

blcham commented 1 month ago

:+1: good job !

blcham commented 1 month ago

Do you know why we need flow-webpack-plugin? Is it even used?

palagdan commented 1 month ago

Do you know why we need flow-webpack-plugin? Is it even used?

It is used for type checking in the webpack build process. I saw it only in one configuration file for webpack. Perhaps it is no longer supported because of TypeScript.

blcham commented 1 month ago

Ok, then i guess we can replace it or remove it if it is too hard to replace it,

palagdan commented 1 month ago

Ok, then i guess we can replace it or remove it if it is too hard to replace it,

Ok then, I'll try to remove it in the current issue.