当前位置:网站首页>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)
希望能得到各位大佬的指点,谢谢
边栏推荐
猜你喜欢
NUC980-镜像烧录
JVM tuning and finishing
关于openlayer中swipe位置偏移的问题
Tinker的自我介绍
JNI入门
场景驱动的特征计算方式OpenMLDB,高效实现“现算先用”
STM32学习笔记(白话文理解版)—按键控制
Scene-driven feature calculation method OpenMLDB, efficient implementation of "calculate first use"
Building a data ecology for feature engineering - Embrace the open source ecology, OpenMLDB fully opens up the MLOps ecological tool chain
Day 85
随机推荐
NUC980-开发环境搭建
批量快速修改代码的正则表达式替换
实时特征计算平台架构方法论和基于 OpenMLDB 的实践
JNI入门
gerrit configure SSH Key and account, email information
Real-time Feature Computing Platform Architecture Methodology and Practice Based on OpenMLDB
JVM调优整理
Jetpack使用异常问题集锦
红外线一认识
js写四位随机数能有多少种可能性?并列出所有可能性
[Meetup] OpenMLDBxDolphinScheduler engineering and scheduling link link characteristics, building the end-to-end MLOps workflow
STM32学习笔记(白话文理解版)—搞懂PWM输出
黑马大事件项目
Some formulas for system performance and concurrency
谨此留个纪念
Promise.race学习(判断多个promise对象执行最快的一个)
OpenMLDB v0.5.0 发布 | 性能、成本、灵活性再攀高峰
Typescript学习日记,typescript从基础到进阶(第一章)
127.0.0.1 已拒绝连接
Tinker接入全流程---配置篇