当前位置:网站首页>mongoose连接mongodb不错,显示encoding没有定义
mongoose连接mongodb不错,显示encoding没有定义
2022-08-11 05:29:00 【学编程的北极熊】
安装mongoose不能连接mongoDB一直没找到原因
- 今天在node中安装了mongoose,按照流程连接mongoDB一直报错,在网上查了好多方法,都没有对应的,希望有大佬能给知道一下,不胜感激
- 连接信息
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost:27017/mynode');
var db = mongoose.connection;
- 报错信息
$ node mongoose11.js
F:\studyFile\mongodbData\data\node_modules\whatwg-url\dist\encoding.js:2
const utf8Encoder = new TextEncoder();
^
ReferenceError: TextEncoder is not defined
at Object.<anonymous> (F:\studyFile\mongodbData\data\node_modules\whatwg-url\dist\encoding.js:2:21)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at Object.<anonymous> (F:\studyFile\mongodbData\data\node_modules\whatwg-url\dist\url-state-machine.js:5:34)
at Module._compile (internal/modules/cjs/loader.js:778:30)
希望能得到各位大佬的指点,谢谢
边栏推荐
猜你喜欢
ARM assembly instruction ADR and LDR
Event Preview | On April 23, a number of wonderful sharing sessions of OpenMLDB will come, which will live up to the good time of the weekend
Day 79
Intelligent risk control China design and fall to the ground
CKEditor富文本编辑器工具栏自定义笔记
实时特征计算平台架构方法论和基于 OpenMLDB 的实践
论文解读TransFG: A Transformer Architecture for Fine-grained Recognition
Matplotlib找不到字体,打印乱码
开源机器学习数据库OpenMLDB贡献者计划全面启动
vscode插件开发——代码提示、代码补全、代码分析(续)
随机推荐
STM32F4-正点原子探索者-SYSTEM文件夹下的delay.c文件内延时函数详解
谨此留个纪念
gerrit 配置SSH Key和账号、邮箱信息
umi约定式路由规则修改
OpenMLDB Pulsar Connector: Efficiently connect real-time data to feature engineering
Day 81
USB中用NRZI来编码数据
Vscode远程连接服务器终端zsh+Oh-my-zsh + Powerlevel10 + Autosuggestions + Autojump + Syntax-highlighting
Vscode remote connection server terminal zsh+Oh-my-zsh + Powerlevel10 + Autosuggestions + Autojump + Syntax-highlighting
STM32学习笔记(白话文理解版)—小灯的点亮、闪烁、呼吸
贡献者任务第三期精彩来袭
Fourth Paradigm OpenMLDB optimization innovation paper was accepted by VLDB, the top international database association
STM32学习笔记(白话文理解版)—USART通信接口
NUC980-开发环境搭建
ARM 汇编指令 ADR 与 LDR 使用
STM32学习笔记(白话文理解版)—按键控制
Day 76
实时特征计算平台架构方法论和基于 OpenMLDB 的实践
批量快速修改代码的正则表达式替换
OpenMLDB Meetup No.2 会议纪要