GithubHelp home page GithubHelp logo

react-full-stack-blog's Introduction

๐Ÿ‘‹ Hi, Iโ€™m Albert

๐Ÿ˜ƒ I'm a web developer based in Seattle, WA.

๐Ÿ’ป After working more than a decade in IT and instructional design, I moved to Web Development in 2020.

๐Ÿ“š I'm learning to become a good Drupal developer, a better WordPress developer, and a better web developer and programmer in general.

๐Ÿ‘‡ Scroll down for contact info, current tools, statistics, and public repositories.

๐ŸŒ Website ย  ย  ๐Ÿ“น Welcome video ย  ย  ๐Ÿ“ง Email ย  ย 

Current Tools

Current Tools

Studying

Studying

react-full-stack-blog's People

Contributors

maplesyrupweb avatar

Watchers

 avatar

react-full-stack-blog's Issues

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'mongodb'

sudo npm run dev
Password:

[email protected] dev
npx nodemon src/server.js

[nodemon] 3.0.1
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting node src/server.js
node:internal/errors:496
ErrorCaptureStackTrace(err);
^

Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'mongodb' imported from /Users/albert/Developer/LinkedIn Learning/react-full-stack-blog/my-blog-backend/src/server.js
at new NodeError (node:internal/errors:405:5)
at packageResolve (node:internal/modules/esm/resolve:887:9)
at moduleResolve (node:internal/modules/esm/resolve:936:20)
at defaultResolve (node:internal/modules/esm/resolve:1129:11)
at nextResolve (node:internal/modules/esm/loader:163:28)
at ESMLoader.resolve (node:internal/modules/esm/loader:835:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:424:18)
at ModuleWrap. (node:internal/modules/esm/module_job:77:40)
at link (node:internal/modules/esm/module_job:76:36) {
code: 'ERR_MODULE_NOT_FOUND'
}

Node.js v18.17.0
[nodemon] app crashed - waiting for file changes before starting...

Installing MongoDB

Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!

Warning: Encountered two children with the same key

Warning: Encountered two children with the same key, comment.postedBy + ' ' comment.text. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted โ€” the behavior is unsupported and could change in a future version.
CommentsList@http://localhost:3000/static/js/bundle.js:563:22
ArticlePage@http://localhost:3000/static/js/bundle.js:922:88
RenderedRoute@http://localhost:3000/static/js/bundle.js:53761:7
Routes@http://localhost:3000/static/js/bundle.js:54377:7
div
div
Router@http://localhost:3000/static/js/bundle.js:54319:7
BrowserRouter@http://localhost:3000/static/js/bundle.js:52432:7

MongoDB: Password contains unescaped characters

when running nom run dev, this message appears:

throw new MongoParseError('Password contains unescaped characters');
^

MongoParseError: Password contains unescaped characters
at new ConnectionString (/Users/albert/Developer/LinkedIn Learning/react-full-stack-blog/my-blog-backend/node_modules/mongodb-connection-string-url/lib/index.js:115:23)
at parseOptions (/Users/albert/Developer/LinkedIn Learning/react-full-stack-blog/my-blog-backend/node_modules/mongodb/lib/connection_string.js:188:17)
at new MongoClient (/Users/albert/Developer/LinkedIn Learning/react-full-stack-blog/my-blog-backend/node_modules/mongodb/lib/mongo_client.js:46:63)
at connectToDb (file:///Users/albert/Developer/LinkedIn%20Learning/react-full-stack-blog/my-blog-backend/src/db.js:12:20)
at file:///Users/albert/Developer/LinkedIn%20Learning/react-full-stack-blog/my-blog-backend/src/server.js:189:1
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)

Node.js v18.17.0

Comment form issue

Mongo Shell

  • mongo doesn't work, but mongosh works

react-full-stack-blog(main) > mongosh
Current Mongosh Log ID: 651a36cb98b564b7ac255d47
Connecting to: mongodb://127.0.0.1:27017/?directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.0.1
Using MongoDB: 5.0.17
Using Mongosh: 2.0.1

For mongosh info see: https://docs.mongodb.com/mongodb-shell/


The server generated these startup warnings when booting
2023-10-01T00:25:36.039-07:00: Access control is not enabled for the database. Read and write access to data and configuration is unrestricted

Warning: Found ~/.mongorc.js, but not ~/.mongoshrc.js. ~/.mongorc.js will not be loaded.
You may want to copy or rename ~/.mongorc.js to ~/.mongoshrc.js.

Loading DB from seperate file

file:///Users/albert/Developer/LinkedIn%20Learning/react-full-stack-blog/my-blog-backend/src/server.js:21
const article = await db.collection('articles').findOne({ name });
^

TypeError: Cannot read properties of undefined (reading 'collection')

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.