NextJS加载不同环境的.env文件

NextJS默认加载的是.env.local,所以可以通过一个巧妙地办法,直接复制对应的文件到.env.local中,然后启动。

根目录添加不同环境的.env

➜  chnqoo-recollections-service git:(master) ✗ find . -type f -name ".env*"
./.env.production
./.env.local
./.env.alpha
./.env.staging
./.env.development
阅读更多

Linux/Debian/Ubuntu 安装 MongoDB

Snipaste 2024 02 03 21 12 54

准备工作

导入包管理系统使用的公钥

在终端上,发出以下命令以从https://www.mongodb.org/static/pgp/server-4.2.asc导入MongoDB公共GPG密钥:

root@VM-4-9-debian:~# wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt
-key add -
E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this
operation
阅读更多

Error installing lottie-ios

iOS安装lottie报错:

[!] Error installing lottie-ios
[!] /usr/local/bin/git clone https://github.com/airbnb/lottie-ios.git /var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq --template= --single-branch --depth 1 --branch 4.4.0

正克隆到 '/var/folders/s4/d4hj6wbj1_j3w4ynthv1klf80000gn/T/d20240201-9298-1c37cjq'...
error: RPC 失败。curl 56 Recv failure: Connection reset by peer
error: 预期仍然需要 5466 个字节的正文
fetch-pack: unexpected disconnect while reading sideband packet
fatal: 过早的文件结束符(EOF)
fatal: index-pack 失败
阅读更多

Vue3.0 菜鸟儿🐤常见问题汇总

接手了公司的一个祖传项目,这尼玛Vue绝对是世界上最蛋疼的前端语言,研究了一下午连他怎么导出和引入的都没搞明白 …
经过了 N 番面向 ChatGPT 编程,基本算是入门了 …

注意看链接 🔗 名:vue-learning-tears … 这尼玛我是一把鼻涕一把泪学完的 …

组件封装

子组件通知父组件进行更新

Snipaste 2024 01 31 11 32 54

阅读更多

淘宝npm证书yarn报错(certificate has expired)

这尼玛大早上的来就给我报错,

error An unexpected error occurred: “https://registry.npm.taobao.org/@react-native-async-storage%2fasync-storage: certificate has expired”.

➜  chnqoo-recollections-mobile git:(main) yarn
yarn install v1.22.10
info No lockfile found.
[1/5] 🔍 Validating package.json...
[2/5] 🔍 Resolving packages...
error An unexpected error occurred: "https://registry.npm.taobao.org/@react-native-async-storage%2fasync-storage: certificate has expired".
info If you think this is a bug, please open a bug report with the information provided in "/Users/sunyg/chnqoo-recollections-mobile/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
阅读更多