GithubHelp home page GithubHelp logo

henrytsz / earthworm Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cuixiaorui/earthworm

0.0 0.0 0.0 62.31 MB

Learning English through the method of constructing sentences with conjunctions

Home Page: https://earthworm-six.vercel.app/

JavaScript 19.21% TypeScript 77.15% CSS 2.83% Dockerfile 0.81%

earthworm's Introduction

earthworm

Learning English through the method of constructing sentences with conjunctions

Start

Start the project based on the following steps

Note that this project depends on docker, so make sure that docker is installed first.

  1. install project dependencies

    pnpm install
  2. start application

    pnpm docker:start
  3. stop application

    pnpm docker:stop
  4. init data of database (It only needs to be executed the first time the database is created)

    pnpm db:init

当发现数据有问题时 如何修改

目前课程的数据是基于 pdf 解析得到的 json 文件, 所以在解析的过程中必然会出现一些小问题

那么当遇到这些小问题的时候 大家可以通过修改 json 文件来做出对 earthworm 的贡献

以下是贡献步骤:

  1. 找到当前课程所对应的 json 文件

    json 文件在 scripts/courses 里面

    注意 courseId 和 json 名称不是对齐的,需要手动查看确定要修改的 json 文件(TODO 这里是个优化点)

  2. 找到 json 文件中的错误语句

    可以直接在当前的 json 文件中搜索即可, 一个对象对应一个 statement

  3. 修改 json 后提交 pr

    在 pr 中可以介绍下修改的原因

数据的更新

后续我会在合并完 pr 后更新线上数据库上的数据完成更新

常见问题

ReferenceError: Request is not defined

使用 pnpm devpnpm start 命令启动项目时,可能会出现 ReferenceError: Request is not defined 的错误

earthworm\node_modules\.pnpm\[email protected]_biqbaboplfbrettd7655fr4n2y\node_modules\next\dist\server\web\spec-extension\request.js:28
class NextRequest extends Request {
                          ^

ReferenceError: Request is not defined

这是由于 Node.js 版本较低导致的:

What version of Node.js do you use? If it is 16.x, or less, then you should set it to 18.x, assuming that none of the packages you are using, require lower Node.js versions.

详情参见这里:ReferenceError: Request is not defined · vercel/next.js · Discussion #47648

升级到 18.x 及以上即可解决问题

贡献指北

由于本地调试、修改项目时需要使用到 mysql 服务,这里我们可以只用 docker 跑个 mysql 服务

docker compose -f docker-compose-dev.yaml up -d

# 老版本 docker 兼容命令
docker-compose -f docker-compose-dev.yaml up -d

# 或者可以通过 package.json 的命令来启动
pnpm docker:mysql

然后顺序执行下列命令即可

pnpm install
pnpm db:init
pnpm dev

earthworm's People

Contributors

can1177 avatar cuixiaorui avatar danmosama avatar fengstats avatar henrytsz avatar hildxd avatar myltx avatar mynameszhazh avatar widdycai avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.