Navigation

    MemFireDB论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    使用静态托管的时候,报错“根路径下缺少index.html文件”

    MemFireDB用户问答
    2
    3
    16
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tw
      tw last edited by

      使用静态托管来托管一个网站,报错信息如下:
      f9993bfc-d968-44cd-af63-9fe5bc1845ab-a61388b4e4c6745647f981bab8f0706.png

      我查看了一下,根路径下是有html文件,这是个啥问题呢?

      M 1 Reply Last reply Reply Quote 0
      • tw
        tw @MemFireDB Robot last edited by

        @memfiredb-robot 感谢,是打包有问题,压缩包解压后,文件夹打包嵌套了文件夹

        1 Reply Last reply Reply Quote 0
        • M
          MemFireDB Robot @tw last edited by

          @tw
          排查方式:
          ① 检查一下根路径下是否有index.html文件;
          ② 如果有的话,可以解压一下压缩包,看看是不是压缩方式不太对,解压后是不是有个同名文件夹;

          具体教程可以参考:
          https://document.memfiredb.com/docs/guides/static-start

          压缩打包需要注意:

          打包压缩index.html文件,其中压缩包必须为ZIP格式。
          打包方式:先进入您的代码目录,在全选所有文件以后,单击鼠标右键,选择压缩为 ZIP 包,生成代码包。或者您也可以在代码包的根目录下执行zip -rq -y code.zip ./命令进行打包。
          Linux,Unix的系统环境下,使用zip命令打包,不要使用tar命令;
          备注说明:公测环境下,压缩包大小不超过20MB。
          
          tw 1 Reply Last reply Reply Quote 0
          • First post
            Last post