socketio / socket.io-admin-ui

Admin UI for Socket.IO
https://admin.socket.io
MIT License
358 stars 95 forks source link

Node version compatibility of the client side and creation of the docker container. #83

Open serhatoral opened 10 months ago

serhatoral commented 10 months ago

Running client(ui folder) in localhost

You can access the working version of the client side (ui folder) from this repository .

This project doesn't support Node versions higher than 14.21.3 and npm versions higher than 6.14.18 . Is not compatible with higher versions of sass library. You should downgride Node version on your computer. You can easily do this by using nvm as fallows;

nvm install 14.21.3
nvm use 14.21.3
nvm list

Finally, you can run the project using npm install and npm run serve

Docker container

To create a docker container, you can update the dockerfile file as in this pull-request and add the nginx.conf file.

yarikpetrenko commented 10 months ago

@serhatoral What you mean? It works fine for me on node.js v20.9.0.

serhatoral commented 10 months ago

@yarikpetrenko I was getting errors when I tried to run it using Node 14.21.3 and npm versions higher than 6.14.18. When I changed the Node version from 18.16.0 to 14.21.3 and npm from 9.5.1 to 6.14.18, it worked. Now I tried with node version 21.6.0 and got errors again. Which version of npm are you using? It may also be due to the npm version that the project is not working. Can you delete the node_module folder and try npm install again?

I'm getting errors related to the sass library.

yarikpetrenko commented 10 months ago

@serhatoral Now I get it.... You are speaking about client side. Yeah I can see that ui uses some old packages but there is also a Dockerfile inside ui folder so you can setup everything with docker I guess. Also if you want to just serve client side not edit you can use any web server or even just double click index.html inside ui/dist as it says in README. I use 'Live Server' extension for VSCode for convenience.

serhatoral commented 10 months ago

@yarikpetrenko You're right, I should have mentioned that the problem is on the client :slightly_smiling_face: in case anyone tries to run the client locally, I wanted to write. This method worked for me.

ghost commented 10 months ago

thanks serhat. It worked for the issue I opened here https://github.com/socketio/socket.io-admin-ui/issues/78

darrachequesne commented 10 months ago

I'm investigating the build issues.

Delapouite commented 4 months ago

Hello.

Using an old Node.js 14.x version definitely helps to get ride of most errors (sass, error:0308010C:digital envelope routines::unsupported…).

One babel related problem around the support of underscores in numbers still undermines the npm run serve operation:

> vue-cli-service serve

 INFO  Starting development server...
98% after emitting CopyPlugin

 ERROR  Failed to compile with 1 error                                                                                                                                                                                 11:56:12 AM

 error  in ./src/store/modules/main.js

Module parse failed: Identifier directly after number (87:35)
File was processed with these loaders:
 * ./node_modules/cache-loader/dist/cjs.js
 * ./node_modules/babel-loader/lib/index.js
 * ./node_modules/eslint-loader/index.js
You may need an additional loader to handle the result of these loaders.
| // see: https://www.chartjs.org/docs/latest/general/performance.html#decimation
| function roundedTimestamp(timestamp) {
>   return timestamp - timestamp % 10_000;
| }
| export default {

 @ ./src/store/index.js 5:0-34 12:4-8
 @ ./src/main.js
 @ multi (webpack)-dev-server/client?http://10.69.1.2:8080&sockPath=/sockjs-node (webpack)/hot/dev-server.js ./src/main.js