nikeee / edotor.net

Your favourite Graphviz editor
https://edotor.net
MIT License
175 stars 21 forks source link

Cannot get development environment running #69

Open b-a0 opened 8 months ago

b-a0 commented 8 months ago

I am trying to get v1.7.1 running (or any version for that matter) but I struggle with the various dependency versions.

Firstly: what node version should I use for v1.7.1?

Secondly: whenever I run npm install after cloning the v1.7.1 tag I get a dependency conflict:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: monaco-editor-webpack-plugin@1.7.0
npm ERR! Found: monaco-editor@0.18.1
npm ERR! node_modules/monaco-editor
npm ERR!   monaco-editor@"~0.18.1" from the root project
npm ERR!   peer monaco-editor@"*" from react-monaco-editor@0.34.0
npm ERR!   node_modules/react-monaco-editor
npm ERR!     react-monaco-editor@"^0.34.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer monaco-editor@"^0.15.1" from monaco-editor-webpack-plugin@1.7.0
npm ERR! node_modules/monaco-editor-webpack-plugin
npm ERR!   dev monaco-editor-webpack-plugin@"~1.7.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: monaco-editor@0.15.6
npm ERR! node_modules/monaco-editor
npm ERR!   peer monaco-editor@"^0.15.1" from monaco-editor-webpack-plugin@1.7.0
npm ERR!   node_modules/monaco-editor-webpack-plugin
npm ERR!     dev monaco-editor-webpack-plugin@"~1.7.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

I then circumvent that with --legacy-peer-deps, which installs succesfully.

However, when I try to build with npm run build:prod I get module not found errors:

ERROR in ./node_modules/monaco-languageclient/lib/services.js
Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/app/node_modules/monaco-languageclient/lib'
ERROR in ./node_modules/monaco-languageclient/lib/connection.js
Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/main' in '/app/node_modules/monaco-languageclient/lib'
ERROR in ./node_modules/monaco-languageclient/lib/monaco-converter.js
Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/app/node_modules/monaco-languageclient/lib'
ERROR in ./node_modules/monaco-languageclient/lib/connection.js
Module not found: Error: Can't resolve 'vscode-languageserver-protocol/lib/utils/is' in '/app/node_modules/monaco-languageclient/lib'

What steps do I need to take to get any version of this great app running?

nikeee commented 8 months ago

Yeah, the build is currently broken. My intention was to fix this with a rewrite, but I did not manage to get there until now. I'll see if I can speed this up.

b-a0 commented 8 months ago

I see, thanks for the fast response. I managed to get v1.6.0 working with below Dockerfile, but failed to do the same for more recent versions.

These is the Dockerfile I used

FROM node:14-bullseye

RUN git clone --depth 1 --branch v1.6.0 https://github.com/nikeee/edotor.net.git edotor
WORKDIR /edotor

RUN npm install
RUN npm install -g serve
RUN npm run build:prod

# EXPOSE 3000
CMD ["serve", "-s", "dist"]