GithubHelp home page GithubHelp logo

basir / next-tailwind-amazona Goto Github PK

View Code? Open in Web Editor NEW
228.0 7.0 144.0 967 KB

Build Ecommerce Like Amazon By NEXT JS

Home Page: https://next-tailwind-amazona.vercel.app

JavaScript 99.15% CSS 0.85%
cart ecommerce mongodb mongoose nextjs paypal shopping-cart

next-tailwind-amazona's Issues

Shift to Appdir

Please shift to appdir as per next 13. Would be great to see how u hande api routes

PROD ERROR: Client disconnects from database causing 500 error until restart

This happens on a fresh git clone. In development environment it works fine but when in production it will disconnect when you try to login.

I set NODE_ENV="production" in ENV variables to allow disconnect function but it makes no difference. It seems to get disconnected outside of the disconnect function.

New Connection
Already Connected
MongoNotConnectedError: Client must be connected before running operations
at executeOperationAsync (/var/www/irishimpressions/node_modules/mongodb/lib/operations/execute_operation.js:24:19)
at /var/www/irishimpressions/node_modules/mongodb/lib/operations/execute_operation.js:12:45
at maybeCallback (/var/www/irishimpressions/node_modules/mongodb/lib/utils.js:338:21)
at executeOperation (/var/www/irishimpressions/node_modules/mongodb/lib/operations/execute_operation.js:12:38)
at FindCursor._initialize (/var/www/irishimpressions/node_modules/mongodb/lib/cursor/find_cursor.js:54:50)
at FindCursor.[kInit] (/var/www/irishimpressions/node_modules/mongodb/lib/cursor/abstract_cursor.js:444:14)
at next (/var/www/irishimpressions/node_modules/mongodb/lib/cursor/abstract_cursor.js:512:22)
at node:internal/util:360:7
at new Promise ()
at next (node:internal/util:346:12) {
[Symbol(errorLabels)]: Set(0) {}
}

Image braking

I am at lesson 6 image is breaking its not loading i have attached screen shot solution is apricated
Image braking screen shot

Store Provider Error

I'm trying to replicate the project from youtube using Next JS + Typescript, I bumped into and issue saying that there is a an error of Parsing error: '>' expected.eslint

Here is the full code:

import { createContext, useReducer } from 'react';

export const Store = createContext();

const initialState = {
  cart: {
    cartItems: [],
  },
};

function reducer(state, action) {
  switch (action.type) {
    case 'CART_ADD_ITEM': {
      const newItem = action.payload;
      const existingItem = state.cart.cartItems.find(
        (item) => item.slug === newItem.slug
      );
      const cartItems = existingItem
        ? state.cart.cartItems.map((item) =>
            item.name === existingItem.name ? newItem : item
          )
        : [...state.cart.cartItems, newItem];
      return { ...state, cart: { ...state.cart, cartItems } };
    }
    default:
      return state;
  }
}

export function StoreProvider({ children }) {
  const [state, dispatch] = useReducer(reducer, initialState);
  const value = { state, dispatch };
  return <Store.Provider value={value}>{children}</Store.Provider>;
}

Here is the error image:

image

am I missing something?

[slug].js

image
What would be the alternative for this since layout="responsive" is deprecated?

error mongoose

error - MongoServerError: bad auth : Authentication failed.
at Connection.onMessage (G:\Projects\Full stack web development\github\Next_Project\puraton-book-shop\node_modules\mongodb\lib\cmap\connection.js:207:30)
at MessageStream. (G:\Projects\Full stack web development\github\Next_Project\puraton-book-shop\node_modules\mongodb\lib\cmap\connection.js:60:60)
at MessageStream.emit (node:events:527:28)
at processIncomingData (G:\Projects\Full stack web development\github\Next_Project\puraton-book-shop\node_modules\mongodb\lib\cmap\message_stream.js:132:20)
at MessageStream._write (G:\Projects\Full stack web development\github\Next_Project\puraton-book-shop\node_modules\mongodb\lib\cmap\message_stream.js:33:9)
at writeOrBuffer (node:internal/streams/writable:389:12)
at _write (node:internal/streams/writable:330:10)
at MessageStream.Writable.write (node:internal/streams/writable:334:10)
at TLSSocket.ondata (node:internal/streams/readable:754:22)
at TLSSocket.emit (node:events:527:28) {
ok: 0,
code: 8000,
codeName: 'AtlasError',
page: '/',
[Symbol(errorLabels)]: Set(1) { 'HandshakeError' }
}

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.