adeelibr / node-playground Goto Github PK
View Code? Open in Web Editor NEWNode playground of tutorials
License: MIT License
Node playground of tutorials
License: MIT License
[nodemon] starting node server/index.js
internal/modules/cjs/loader.js:1174
throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath);
^
Error [ERR_REQUIRE_ESM]: Must use import to load ES Module: D:\xampp\htdocs\app\node-playground\chapter-1-chat\server\index.js
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1174:13)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)
at internal/main/run_main_module.js:18:47 {
code: 'ERR_REQUIRE_ESM'
}
[nodemon] app crashed - waiting for file changes before starting...
it would be grate to have unread msg for each conversations in
chatMessageSchema.statics.getRecentConversation
can someone help out?
When I try to initiate chat, I get this response, I've tried all possible solutions but still the same response I get
{
"success": false,
"error": {}
}
please I need urgent help
hey, great tutorial..Im facing an error when i hit
[Get] Get recent convesation
http://localhost:3000/room/565241728497455b966fbc45dc2fa7bd
same issue in
http://localhost:3000/room/565241728497455b966fbc45dc2fa7bd?limit=15&page=0
i get empty data in conversation
{
"success": true,
"conversation": [],
"users": [
{
"_id": "5e221be2bbff463cb239ce14278b11b1",
"firstName": "user1",
"lastName": "user1",
"type": "consumer",
"createdAt": "2021-03-31T22:27:53.203Z",
"updatedAt": "2021-03-31T22:27:53.203Z",
"__v": 0
},
{
"_id": "6736f6c9698549da8c77e75f2a784c06",
"firstName": "user2",
"lastName": "user2",
"type": "consumer",
"createdAt": "2021-03-31T22:28:03.360Z",
"updatedAt": "2021-03-31T22:28:03.360Z",
"__v": 0
}
]
}
Working through the tutorial.
received the following error: import socketio from "socket.io"
SyntaxError: The requested module 'socket.io' does not provide an export name...
When I reverted to socket.io 2.3.0, which is the version you use, I did not receive an error.
thank you. I'm enjoying the tutorial. You give a much more useful introduction to socket.io then I've seen elsewhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.