autogen icon indicating copy to clipboard operation
autogen copied to clipboard

[Issue]: The problem of downloading monaco-editor when accessing autogenstudio in offline environment.

Open shouzheng opened this issue 1 year ago • 6 comments

Describe the issue

When I install autogenstudio in offline environment, and access Skills pages, I am unable to view the corresponding code as the page keeps displaying the "Loading" status.

I found a JavaScript error in the console. GET https://cdn.jsdelivr.net/npm/[email protected]/min/vs/loader.js net::ERR_CONNECTION_REFUSED

I am not very familiar with front-end technology and would like to ask how to solve this problem, such as whether it is possible to manually download scripts and modify which configuration to make it use local scripts.

THX~

Steps to reproduce

  1. Install autogenstudio in offline environment which cannot access cdn.
  2. Visit the Skills page and check the specific Skill.

Screenshots and logs

  1. the page keeps displaying the "Loading" status.
  2. the console show: GET https://cdn.jsdelivr.net/npm/[email protected]/min/vs/loader.js net::ERR_CONNECTION_REFUSED

Additional Information

No response

shouzheng avatar Sep 23 '24 06:09 shouzheng

FYI - @victordibia

jackgerrits avatar Feb 20 '25 18:02 jackgerrits

Thanks for pointing this out! Btw what's the use case here?

gagb avatar Feb 20 '25 18:02 gagb

I encountered the same problm of failed connection to cdn.jsdelivr.net.

My solution is to change to another CDN: Open the folder autogenstudio\web\ui in VSCode. Search cdn.jsdelivr.net and find "https://cdn.jsdelivr.net/npm/[email protected]/min/vs" in a .js file. Replace it with "https://fastly.jsdelivr.net/npm/[email protected]/min/vs". Restart autogenstudio ui --port XXXX. If it is needed, change the port to get out of the browser cache.

Maybe it is possible to host a local HTTP server providing the npm package in offline environment?

yyi17 avatar Apr 10 '25 08:04 yyi17

I encountered the same problm of failed connection to cdn.jsdelivr.net.

My solution is to change to another CDN: Open the folder autogenstudio\web\ui in VSCode. Search cdn.jsdelivr.net and find "https://cdn.jsdelivr.net/npm/[email protected]/min/vs" in a .js file. Replace it with "https://fastly.jsdelivr.net/npm/[email protected]/min/vs". Restart autogenstudio ui --port XXXX. If it is needed, change the port to get out of the browser cache.

Maybe it is possible to host a local HTTP server providing the npm package in offline environment?

I found that there is no such key information in the source code. Do we need to manually solve it every time we package it?

xiaoSS-developer avatar Apr 22 '25 10:04 xiaoSS-developer

I encountered the same problm of failed connection to cdn.jsdelivr.net. My solution is to change to another CDN: Open the folder autogenstudio\web\ui in VSCode. Search cdn.jsdelivr.net and find "https://cdn.jsdelivr.net/npm/[email protected]/min/vs" in a .js file. Replace it with "https://fastly.jsdelivr.net/npm/[email protected]/min/vs". Restart autogenstudio ui --port XXXX. If it is needed, change the port to get out of the browser cache. Maybe it is possible to host a local HTTP server providing the npm package in offline environment?

I found that there is no such key information in the source code. Do we need to manually solve it every time we package it?

This problem does not lay in autogenstudio per se but the monaco-editor. So the URL is not present in the source code, but in the compiled JavaScript file in the released package.

yyi17 avatar Apr 25 '25 00:04 yyi17

Is there any other solution?

zk0614 avatar Nov 11 '25 02:11 zk0614