azatakmyradov / sagex3-compiler-server

SageX3 Compiler NodeJS server
3 stars 1 forks source link

Problems with compiler #3

Open AsierLaxGallego opened 1 month ago

AsierLaxGallego commented 1 month ago

Hi Azat Akmyradov, I try to install and configure the extension, but when I tried to open a source file I have an error:

[Window Title] Visual Studio Code [Main Instruction] Command 'SageX3: Open file' resulted in an error [Content] Request failed with status code 404

Could you help me?

Thanks. Regards. Error vscode sagex3 compiler

azatakmyradov commented 1 month ago

@AsierLaxGallego did you follow installation steps from README.md?

AsierLaxGallego commented 1 month ago

Hi @azatakmyradov

This are the steps in order:

Step 1: In VSCode, from Terminal execute npx x3-install-compiler image image image

Step 2: Configuration, if I clone the repository in C:\ drive, I get a new folder with name sagex3-compiler-server-1 and is no the same that the folder installed, becouse dont have "dist" folder. Is necesary clone folder in the same place?

If I continue with configuration in the sagex3-compiler-server folder created in the first step, becouse env file is OK, I continue with step 4: npm install

Step 5: run npm install -g pm2 image

Step 6: start the server pm2 start app.config.js but my file is app.config.cjs image

Step 7: Install the vscode extension

Step 8: From Command Palette execute "Sage X3: Create configuration" with my data and generate sagex3.config.json in sagex3-compiler-server folder. image

Step 9: From Command Palette execute "Sage X3: Open file" to open a .src file to do some modifications and try to compile. But I have this error. image

Maybe I`m doing some step wrong?

Thanks Regards.

azatakmyradov commented 1 month ago

What do you get when you visit this url: https://x3erpv12sqlvm:50012 ? In your sagex3.config.json file, update base_url port from 8443 => 50012

AsierLaxGallego commented 1 month ago

Hi @azatakmyradov,

The 50012 port is the X3 Runtime port. If i write this port in the URL is not accesible. image

Which port is necesary in .env file, and in sagex3.config.json ? This is my port configuration to Syracuse web server. image

I understund that data in sagex3.config.json is to connect to the dossier, and data in .env file are the URL with access to Sage X3 with Syracuse. In this installation I have the X3 Runtime port on 50012, and Syracuse web ports abailables 8443 with https, and 8124 only with http.

image

image

If I use in the port th 8124, when start the service from vscode terminal all the time there are a cmd window, and is necessary to close the PID.

I have the same error when try to open a file: image

Thanks Regards.

azatakmyradov commented 1 month ago

Sorry for the late response but on the .env file in compiler server change the port that is not used by other service and restart the compiler using:

pm2 stop compiler

then:

pm2 start compiler

After you restart you can open the browser and see if you get a response (http://localhost:PORT)

Last step is on sagex3.config.json change the base url fromhttp://localhost:8124/ to http://localhost:PORT. Port is the one you just defined on the compiler.

Let me know if this works. I might probably work on this a little bit to make it easier to configure

AsierLaxGallego commented 1 week ago

Hi Azatakmyradov, Sorry for my late response. Now I configure 3001 port, and http://localhost:3001 response correctly. image

I start the compiler. image

I have 2 situations:

image

And whe try to open a file, the error is Invalid URL. image

Some idea?

Thanks Regards.