常州品牌网站建设郑州网站建设 论坛
2026/3/25 13:52:30 网站建设 项目流程
常州品牌网站建设,郑州网站建设 论坛,网站建设网站优化,wordpress顶部菜单调用WebVM是一款基于WebAssembly技术的浏览器虚拟机#xff0c;可直接在浏览器中运行完整的Linux环境#xff0c;无需服务器支持 源码#xff1a;https://github.com/leaningtech/webvm/ github部署 安装介绍#xff1a; 动手实践#xff1a; 打开网站#xff1a;https://…WebVM是一款基于WebAssembly技术的浏览器虚拟机可直接在浏览器中运行完整的Linux环境无需服务器支持源码https://github.com/leaningtech/webvm/github部署安装介绍动手实践打开网站https://github.com/leaningtech/webvmfork到自己的github账户直接点setting在setting页面点击pages在Pages展开的右边页面打开Build and deployment下面的GitHub ACtions选Deploy from a branch可以看到把main映射到根目录了然后点Action出现Workflows页面点绿色的大按钮出现Actions页面点左侧的Deploy按钮点右侧的Run workflow,然后点绿色按钮Run workflow后面就是慢慢等待发布成功但是不知道为何我这边发布是失败的。本地部署下载源码git clone https://github.com/leaningtech/webvm.git cd webvm下载Debian mini 镜像wget https://github.com/leaningtech/webvm/releases/download/ext2_image/debian_mini_20230519_5022088024.ext2修改配置文件Edit config_public_terminal.js to reference your local disk image:Replace:wss://disks.webvm.io/debian_large_20230522_5044875331.ext2With:/disk-images/debian_mini_20230519_5022088024.ext2(Use an absolute or relative URL pointing to the disk image location.)Replacecloudwith the correct disk image type:bytes最终修改成这样// The root filesystem location // export const diskImageUrl wss://disks.webvm.io/debian_large_20230522_5044875331_2.ext2; export const diskImageUrl debian_large_20230522_5044875331_2.ext2; // The root filesystem backend type // export const diskImageType cloud; export const diskImageType bytes;buildnpm install npm run build实战中我是使用了pnpmpnpm install pnpm run buildbuild完成提示[vite-plugin-static-copy] Copied 6 items. ✓ built in 32.50s Run npm run preview to preview your production build locally. Using sveltejs/adapter-static Wrote site to build ✔ done配置nginxmkdir disk-images mv debian_mini_20230519_5022088024.ext2 disk-images/修改nginx.conf文件加入​ location /disk-images/ { root .; autoindex on; } ​启动nginxsudo nginx -p . -c nginx.conf出来页面了尽管只是个黑黑的控制台也很棒了不过后面有报错没搞定。调试pnpm run build报错 webvm2.0.0 build vite buildvite v5.4.21 building SSR bundle for production...✓ 31 modules transformed.x Build failed in 1.06serror during build:config_public_terminal.js (2:9): Expected ;, } or eoffile: config_public_terminal.js:2:91: // The root filesystem location2: # export const diskImageUrl wss://disks.webvm.io/debian_large_20230522_5044875331_2.ext2;^3: export const diskImageUrl debian_large_20230522_5044875331_2.ext2;4: // The root filesystem backend typeat getRollupError (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/parseAst.js:401:41)at ParseError.initialise (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/node-entry.js:14469:28)at convertNode (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/node-entry.js:16352:10)at convertProgram (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/node-entry.js:15592:12)at Module.setSource (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/node-entry.js:17352:24)at async ModuleLoader.addModuleSource (file:///home/skywalk/github/webvm/node_modules/.pnpm/rollup4.53.3/node_modules/rollup/dist/es/shared/node-entry.js:21377:13)发现是注释用错了不应该用#要用//// The root filesystem location // export const diskImageUrl wss://disks.webvm.io/debian_large_20230522_5044875331_2.ext2; export const diskImageUrl debian_large_20230522_5044875331_2.ext2; // The root filesystem backend type // export const diskImageType cloud; export const diskImageType bytes;build完成这段代码应该放到nginx的哪里location /disk-images/ { root .; autoindex on; }放到主文件的location / 后面或前面webvm启动报错curl --max-time 15 parrot.live # requires networkingWebVM encountered an unexpected errorCheck the DevTools console for further informationPlease consider reporting a bug!CheerpX internal error message is:Initialization failed for HttpBytesDevice: Server returned 404不知道为啥啊是不是国内网络的锅啊

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询