Giter Site home page Giter Site logo

next13-messenger's People

Contributors

antonioerdeljac avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

next13-messenger's Issues

Issue with not create user in the register.js

Registration Error: PrismaClientInitializationError:
Invalid prisma.user.create() invocation:

error: Error validating data source
Screenshot from 2023-11-26 09-37-08
Uploading Screenshot from 2023-11-26 09-38-01.png…
db: the URL must start with the protocol mongo.
--> schema.prisma:10
|
9 | provider = "mongodb"
10 | url = env("DATABASE_URL")
|

Validation Error Count:

Images from cloudinary not working in production

Images from cloudinary or google user content / github are not working in production. There seems to be an extra '_next/image' that is being appended to the url by default.

ex:
https://slacky-chat.vercel.app/_next/image?url=https%3A%2F%2Flh3.googleusercontent.com%2Fa%2FAGNmyxY4AwK5BTGQ11WQMmkg2hiSk-feir4T8-Y_r0tpCvY%3Ds96-c&w=1200&q=75 400

But in development it works all just find. This is in spite of whitelisting the domains in nextConfig.js

NOT sure how to come.

callback url not updated to the vercel generated url

Adding `next-superjson-plugin` creating Error

Here I added the next-superjson-plugin to the project

And after that It started showing error

I have changed different versions of next and next-superjson-plugin but still it don't works

Here are the codes from different parts

from next.config.js

/** @type {import('next').NextConfig} */
const nextConfig = {
    experimental: {
        appDir: true,
        swcPlugins: [["next-superjson-plugin", {}]]
    },
}

module.exports = nextConfig

and the package.json for the version check

   "next": "13.3.1",
    "next-auth": "^4.22.1",
    "next-superjson-plugin": "^0.5.8",
    "postcss": "8.4.24",

And here is the error that is coming out

error - ./node_modules/next/dist/client/dev/amp-dev.js
Error: failed to process failed to invoke plugin: failed to invoke plugin on 'Some("/Users/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next/dist/client/dev/amp-dev.js")'

Caused by:
0: failed to invoke /Users/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next-superjson-plugin/dist/next_superjson.wasm as js transform plugin at /Users/ashutoshhota/Coding/web development/Next JS/Ongoing Projects/Messenger Clone/Messenger Clone/Messenger-Clone/node_modules/next-superjson-plugin/dist/next_superjson.wasm
1: RuntimeError: unreachable
2: unreachable

Please Help

Fix and Question: middleware not redirecting to '/' (Next.js v13.4.1)

I might be encountering this problem because I enabled /src directory when I ran npx create-next-app@latest.

I encountered this problem at 2:06:52.
My npx next -v is Next.js v13.4.1

Here's how I fixed it.

  1. In /tsconfig.json (under the project's root), add , "middleware.ts" inside the "include" array. Here's my tsconfig.json
{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true,
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    "incremental": true,
    "plugins": [
      {
        "name": "next"
      }
    ],
    "paths": {
      "@/*": ["./src/*"]
    }
  },
  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts", "middleware.ts"],
  "exclude": ["node_modules"]
}

  1. Create /pages directory inside the project's root or inside /src. It can be empty.
    mkdir pages

Source: vercel/next.js#43141

Any other workarounds?

UserList map item issue

when I was trying to show users from userbox into userlist, i saw this error:

Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'map')

Source:
app\users\components\UserList.tsx

42 |
43 |

44 | {items.map((item) => (
| ^
45 | <UserBox
46 | key={item.id}
47 | data={item}

Incorrect className in MessageBox component's Image component

Hi there,

I came across an issue with the MessageBox component in the app where the Image component has an incorrect className that causes styling issues. Here's the incorrect code:

<Image
  alt="Image"
  height="288"
  width="288"
  onClick={() => setImageModalOpen(true)} 
  src={data.image} 
  className="
    object-cover 
    cursor-pointer 
    hover:scale-110 
    transition 
    translate
  "
/>

The className includes an invalid translate class.

Here's the corrected code:

<Image
  alt="Image"
  height="288"
  width="288"
  onClick={() => setImageModalOpen(true)} 
  src={data.image} 
  className="
    object-cover 
    hover:scale-110 
    cursor-pointer 
    transition 
  "
/>

db must be mongo

Invalid `prisma.user.create()` invocation:


error: Error validating datasource `db`: the URL must start with the protocol `mongo`.
  -->  schema.prisma:10
   |
 9 |   provider = "mongodb"
10 |   url      = env("DATABASE_URL")

In AuthForm when variant state changed then in page.tsx "sign in to your account" heading not changed.

Here under the (site) folder when we changed variant state in AuthForm component , according that state value in page.tsx "sign in to your account" should changed into another text, right?? e.g: "Create your account" .

But in app router page.tsx is server side and AuthForm is client side and i have to send variant state from AuthForm to page.tsx , How to do that? Cause if we have the variant state value then we can easily conditonally do this
{variant === "LOGIN"
? "Sign in to your account"
: "Create your account"
}.
Anyone have any suggestion, how to solve this little issue?

deployment error

Hi there!
I keep getting this issue during deployment. Can anyone suggest how to solve it?

error

Problem when I import the function getCurrentUser()

At Sidebar.tsx component, when i'm importing the function getCurrentUser() and pass the currentUser into DesktopSidebar, this error show up
image

and this error in browser
image

I don't know why this happen. I have try to switch to next version 13.4.5 but it work for a moment then the error happen again. I'm sure this cause problem for my side because when i remove this function the error disappears.

31:56

image

I become an error

so I fixed it by installing again tailwindcss forms

1:35:13

image
I tried restart vs code and reinstall dependencies using npm - useless

useEffect dependency issue in the useActiveChannel hook

Issues:

  1. the active status is not pushed when a user logs in.
  2. In the useActiveChannel hook, the channel should not be subscribed if a user is not authenticated.

Cause:

  1. There is no session in the useEffect dependency array in useActiveChannel hook, so when a user logs in, the useEffect is not triggered.
  2. The pusherClient subscribes to the channel whether the user is logged in or not.

My idea:

  1. add session.status in the useEffect dependency array so the useEffect can be triggered when an user logs in.
  2. add an if statement in the useEffect: if the user is not authenticated, then don't subscribe and return

ImageModal image size problem

Hello,

If original size of image is bigger its not showing correctly uploaded image. I've tried to change width and height or div height and width properties it didnt work.

I dont have enough CSS knowledge to solve this :) Is there anything to do or maybe a sample css code?

error during deployment

스크린샷 2023-08-11 오후 1 25 11

I keep getting this error. If I remove the ts-expect-error then Sidebar compoent won't work, if I include the comment then I can't deploy... someone please help..

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.