Excalidraw-CN 项目常见问题解决方案

Excalidraw-CN 项目常见问题解决方案

excalidraw-cn Excalidraw-CN 是支持中文手写和多画布的 Excalidraw 白板工具。Excalidraw-CN is a whiteboard supporting Chinese hand draw font and multi-canvas based on Excalidraw. excalidraw-cn 项目地址: https://gitcode.com/gh_mirrors/ex/excalidraw-cn

项目基础介绍

Excalidraw-CN 是一个基于 Excalidraw 的开源项目,旨在为中文用户提供更好的手绘风格图表绘制工具。Excalidraw 是一个流行的开源白板工具,支持手绘风格的图形绘制,广泛用于技术文档、演示文稿和协作设计中。Excalidraw-CN 在此基础上进行了本地化优化,使得中文用户能够更方便地使用该工具。

该项目主要使用 TypeScript 作为编程语言,结合 React 框架进行前端开发。TypeScript 提供了静态类型检查,使得代码更加健壮和易于维护。

新手使用注意事项及解决方案

1. 安装依赖时遇到版本冲突

问题描述:
新手在克隆项目后,运行 npm install 时可能会遇到依赖包版本冲突的问题,导致安装失败。

解决步骤:

  1. 检查 Node.js 版本:
    确保你的 Node.js 版本符合项目 package.json 中指定的版本范围。可以在项目根目录下运行 node -v 查看当前 Node.js 版本。

  2. 清理 npm 缓存:
    运行 npm cache clean --force 清理 npm 缓存,避免旧的缓存文件导致安装问题。

  3. 强制重新安装依赖:
    删除 node_modules 目录和 package-lock.json 文件,然后重新运行 npm install

2. 运行项目时出现 ESLint 错误

问题描述:
在开发环境中运行项目时,可能会遇到 ESLint 报错,提示代码格式或语法问题。

解决步骤:

  1. 安装 ESLint 插件:
    确保你的代码编辑器(如 VSCode)安装了 ESLint 插件,并启用自动修复功能。

  2. 手动修复 ESLint 错误:
    运行 npm run lint 命令,查看具体的 ESLint 错误信息。根据提示手动修复代码中的问题。

  3. 自动修复代码格式:
    运行 npm run lint:fix 命令,自动修复大部分代码格式问题。

3. 本地化配置不生效

问题描述:
在配置本地化选项后,界面仍然显示英文,未切换到中文。

解决步骤:

  1. 检查本地化配置文件:
    确认项目中的本地化配置文件(如 locales/zh-CN.json)是否正确配置,并且内容无误。

  2. 更新配置引用:
    确保在项目的主入口文件(如 index.tsx)中正确引用了本地化配置文件,并且配置项已正确加载。

  3. 清除缓存并重启项目:
    删除浏览器缓存,或者在开发环境中重启项目,确保新的本地化配置生效。

通过以上步骤,新手用户可以更好地解决在使用 Excalidraw-CN 项目时遇到的常见问题,顺利进行开发和使用。

excalidraw-cn Excalidraw-CN 是支持中文手写和多画布的 Excalidraw 白板工具。Excalidraw-CN is a whiteboard supporting Chinese hand draw font and multi-canvas based on Excalidraw. excalidraw-cn 项目地址: https://gitcode.com/gh_mirrors/ex/excalidraw-cn

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

ERROR in ./node_modules/@excalidraw/excalidraw/dist/dev/chunk-3KPV5WBD.js 2856:0-39 Module not found: Error: Can't resolve 'roughjs/bin/rough' in '/Users/first/seafile-dev/data/dev/seahub/frontend/node_modules/@excalidraw/excalidraw/dist/dev' Did you mean 'rough.js'? BREAKING CHANGE: The request 'roughjs/bin/rough' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. ERROR in ./node_modules/@excalidraw/excalidraw/dist/dev/chunk-3KPV5WBD.js 2863:0-55 Module not found: Error: Can't resolve 'roughjs/bin/generator' in '/Users/first/seafile-dev/data/dev/seahub/frontend/node_modules/@excalidraw/excalidraw/dist/dev' Did you mean 'generator.js'? BREAKING CHANGE: The request 'roughjs/bin/generator' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified. Add the extension to the request. ERROR in ./node_modules/@excalidraw/excalidraw/dist/dev/chunk-3KPV5WBD.js 15572:0-42 Module not found: Error: Can't resolve 'roughjs/bin/math' in '/Users/first/seafile-dev/data/dev/seahub/frontend/node_modules/@excalidraw/excalidraw/dist/dev' Did you mean 'math.js'? BREAKING CHANGE: The request 'roughjs/bin/math' failed to resolve only because it was resolved as fully specified (probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"'). The extension in the request is mandatory for it to be fully specified.
03-14
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

云忱川

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值