- 博客(5)
- 问答 (1)
- 收藏
- 关注
原创 false.__proto__
console.log(undefined.msg) 报错: Uncaught TypeError: Cannot read properties of undefined (reading 'msg')console.log(null.msg) 报错: Uncaught TypeError: Cannot read properties of null (reading 'msg')console.log("".msg) 输出: undefined。
2024-04-09 20:11:51
261
原创 node v16+ npm安装sqlite3失败解决方案
最终解决方案:升级至sqlite3 5.0.0以上版本,并使用yarn安装。问题:gyp error。python版本不兼容。其他相关case及解决方案。
2024-03-11 14:28:25
2142
原创 mongodb&nvm一些环境配置的踩坑记录
nvm用curl方式下载安装之后,可以看到~/.bashrc末尾被自动添加了nvm的启用配置,然后输入nvm也顺利的出现了指令说明,你以为这就结束了,其实并没有。但因为preview环境的配置文件使用的是~/.bash_profile,所以手动配置后,运行source ~/.bash_profile。如果还是/usr/bin/node而不是~/.nvm/versions/node/版本号/bin/node那也说明nvm没有生效。若bash是以login方式执行时,读取~/.bash_profile。
2023-11-15 20:17:30
46
原创 TypeError: Update document requires atomic operators
更新操作语句没有问题,问题在于mongoose schema中未定义tag字段。
2023-05-30 14:51:30
577
1
原创 mongoose数组查询无法完全匹配
若schema中未准确定义“params.env”为字符串数组,则使用mongoose查询: find({ 'params.env': ['01', '02']会把env:['01']的文档也查询出来。
2023-04-21 20:03:07
100
1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人