【问题标题】:Gatsby doesn't seem to build on Windows Subsystem Linux [Ubuntu]Gatsby 似乎没有在 Windows 子系统 Linux [Ubuntu] 上构建
【发布时间】:2021-02-27 15:28:08
【问题描述】:

注意:我在Part 7 of the GatsbyJS tutorial 中遇到了这个问题(之前的部分运行良好)。

gatsby develop

...似乎触发了成功的构建,但每次访问 http://localhost:8000/ 时站点都会挂起

here 复制问题以获得可见性:

由于 EACCES 问题,Gatsby 似乎没有在 Windows 子系统 Linux 上构建。运行 yarn start / gatsby develop 并成功构建后,脚本不断尝试更新 .cache/redux 并由于权限错误而失败。正因为如此,它不断生成这些 reduxcache 目录

【问题讨论】:

    标签: reactjs gatsby windows-subsystem-for-linux


    【解决方案1】:

    修复:按照此处的说明更新到 WSL2:https://docs.microsoft.com/en-us/windows/wsl/wsl2-kernel

    注意:我仍然有时会看到:

    警告错误持续状态:EACCES:权限被拒绝,重命名 '/home/james/code/gatsby-course-udemy/gatsbyjs-tutorials/.cache/redux' -> '[...]/code/gatsby- course-udemy/gatsbyjs-tutorials/.cache/redux.bak'

    ... 错误,但至少网站正在构建、加载和运行中没有任何明显问题!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-02-27
      • 1970-01-01
      • 2019-06-27
      • 2018-06-09
      • 1970-01-01
      • 1970-01-01
      • 2018-06-12
      相关资源
      最近更新 更多