basir / next-tailwind-amazona Goto Github PK
View Code? Open in Web Editor NEWBuild Ecommerce Like Amazon By NEXT JS
Home Page: https://next-tailwind-amazona.vercel.app
Build Ecommerce Like Amazon By NEXT JS
Home Page: https://next-tailwind-amazona.vercel.app
When filling out the shipping address, choosing an address on a map does not work.
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' }
}
when i tried to login with the loginAPI, it showing me this error. Anyone can help?
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:
am I missing something?
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) {}
}
Please shift to appdir as per next 13. Would be great to see how u hande api routes
My register screen not displayed and always back to login screen
after click place order button im getting 401 error after deploying on vercel. Localy everything work perfect. Any ideas ?
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.