Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need Help #7

Open
Erquexd opened this issue Oct 13, 2024 · 5 comments
Open

I need Help #7

Erquexd opened this issue Oct 13, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Erquexd
Copy link

Erquexd commented Oct 13, 2024

CMD
Microsoft Windows [Version 10.0.22631.4317]
(c) Microsoft Corporation. Tüm hakları saklıdır.

D:\Connectify>npm start

[email protected] start
next start

▲ Next.js 14.2.15

✓ Starting...
✓ Ready in 325ms
{
id: 'cm235bw3o0000sf9nm5kq9ckz',
userId: 'user_2nF4Mv4xBO3Hl6LjhJaQaHqqAAb',
name: 'Erque',
email: '@gmail.com',
imageUrl: 'https://img.clerk.com/
',
createdAt: 2024-10-10T10:18:46.213Z,
updatedAt: 2024-10-10T10:18:46.213Z
}
⨯ Error: Cannot find module 'next/dist/compiled/next-server/app-route.runtime.prßod.js'
Require stack:

  • D:\Connectify.next\server\app\api\messages\route.js
  • D:\Connectify\node_modules\next\dist\server\require.js
  • D:\Connectify\node_modules\next\dist\server\next-server.js
  • D:\Connectify\node_modules\next\dist\server\next.js
  • D:\Connectify\node_modules\next\dist\server\lib\start-server.js
  • D:\Connectify\node_modules\next\dist\cli\next-start.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at D:\Connectify\node_modules\next\dist\server\require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\Connectify\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at 30517 (D:\Connectify.next\server\app\api\messages\route.js:1:509)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128)
    at 73278 (D:\Connectify.next\server\app\api\messages\route.js:1:2193)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'D:\Connectify\.next\server\app\api\messages\route.js',
    'D:\Connectify\node_modules\next\dist\server\require.js',
    'D:\Connectify\node_modules\next\dist\server\next-server.js',
    'D:\Connectify\node_modules\next\dist\server\next.js',
    'D:\Connectify\node_modules\next\dist\server\lib\start-server.js',
    'D:\Connectify\node_modules\next\dist\cli\next-start.js'
    ]
    }
    ⨯ Error: Cannot find module 'next/dist/compiled/next-server/app-route.runtime.prßod.js'
    Require stack:
  • D:\Connectify.next\server\app\api\messages\route.js
  • D:\Connectify\node_modules\next\dist\server\require.js
  • D:\Connectify\node_modules\next\dist\server\next-server.js
  • D:\Connectify\node_modules\next\dist\server\next.js
  • D:\Connectify\node_modules\next\dist\server\lib\start-server.js
  • D:\Connectify\node_modules\next\dist\cli\next-start.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at D:\Connectify\node_modules\next\dist\server\require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\Connectify\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at 30517 (D:\Connectify.next\server\app\api\messages\route.js:1:509)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128)
    at 73278 (D:\Connectify.next\server\app\api\messages\route.js:1:2193)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'D:\Connectify\.next\server\app\api\messages\route.js',
    'D:\Connectify\node_modules\next\dist\server\require.js',
    'D:\Connectify\node_modules\next\dist\server\next-server.js',
    'D:\Connectify\node_modules\next\dist\server\next.js',
    'D:\Connectify\node_modules\next\dist\server\lib\start-server.js',
    'D:\Connectify\node_modules\next\dist\cli\next-start.js'
    ]
    }
    ⨯ Error: Cannot find module 'next/dist/compiled/next-server/app-route.runtime.prßod.js'
    Require stack:
  • D:\Connectify.next\server\app\api\messages\route.js
  • D:\Connectify\node_modules\next\dist\server\require.js
  • D:\Connectify\node_modules\next\dist\server\next-server.js
  • D:\Connectify\node_modules\next\dist\server\next.js
  • D:\Connectify\node_modules\next\dist\server\lib\start-server.js
  • D:\Connectify\node_modules\next\dist\cli\next-start.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at D:\Connectify\node_modules\next\dist\server\require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at mod.require (D:\Connectify\node_modules\next\dist\server\require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at 30517 (D:\Connectify.next\server\app\api\messages\route.js:1:509)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128)
    at 73278 (D:\Connectify.next\server\app\api\messages\route.js:1:2193)
    at t (D:\Connectify.next\server\webpack-runtime.js:1:128) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'D:\Connectify\.next\server\app\api\messages\route.js',
    'D:\Connectify\node_modules\next\dist\server\require.js',
    'D:\Connectify\node_modules\next\dist\server\next-server.js',
    'D:\Connectify\node_modules\next\dist\server\next.js',
    'D:\Connectify\node_modules\next\dist\server\lib\start-server.js',
    'D:\Connectify\node_modules\next\dist\cli\next-start.js'
    ]
    }
    ⨯ E
@Erquexd Erquexd added the bug Something isn't working label Oct 13, 2024
@issam-seghir
Copy link
Owner

issam-seghir commented Oct 14, 2024

did you run : npm install ?
if so try to delete .next folder or node_models and install them again :

@Erquexd
Copy link
Author

Erquexd commented Oct 14, 2024

Microsoft Windows [Version 10.0.22631.4317]
(c) Microsoft Corporation. Tüm hakları saklıdır.

D:\Connectify>npm install
npm warn deprecated [email protected]: Rimraf versions prior to v4 are no longer supported
npm warn deprecated [email protected]: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 644 packages, and audited 645 packages in 22s

159 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

D:\Connectify>npm build
Unknown command: "build"

Did you mean this?
npm run build # run the "build" package script
To see a list of supported npm commands, run:
npm help

D:\Connectify>npm run build

[email protected] build
next build

▲ Next.js 14.2.15

  • Environments: .env

Creating an optimized production build ...
✓ Compiled successfully

./src/components/user/user-details.tsx
61:7 Warning: Using <img> could result in slower LCP and higher bandwidth. Consider using <Image /> from next/image to automatically optimize images. This may incur additional usage or cost from your provider. See: https://nextjs.org/docs/messages/no-img-element @next/next/no-img-element
61:7 Warning: img elements must have an alt prop, either with meaningful text, or an empty string for decorative images. jsx-a11y/alt-text

info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
✓ Linting and checking validity of types
✓ Collecting page data
Generating static pages (0/14) [= ]n [Error]: Dynamic server usage: Route /api/messages couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at l (D:\Connectify.next\server\chunks\9379.js:1:37156)
at d (D:\Connectify.next\server\chunks\9609.js:9:21433)
at s (D:\Connectify.next\server\chunks\9609.js:1:5884)
at I (D:\Connectify.next\server\chunks\9609.js:1:4669)
at H (D:\Connectify.next\server\chunks\6296.js:1:5625)
at c (D:\Connectify.next\server\app\api\servers[serverId]\invite-code\route.js:1:3550)
at l (D:\Connectify.next\server\app\api\messages\route.js:1:1025)
at D:\Connectify\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:36963
at D:\Connectify\node_modules\next\dist\server\lib\trace\tracer.js:140:36
at NoopContextManager.with (D:\Connectify\node_modules\next\dist\compiled@opentelemetry\api\index.js:1:7062) {
description: "Route /api/messages couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error",
digest: 'DYNAMIC_SERVER_USAGE'
} MESSAGES API ERROR
n [Error]: Dynamic server usage: Route /api/direct-messages couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
at l (D:\Connectify.next\server\chunks\9379.js:1:37156)
at d (D:\Connectify.next\server\chunks\9609.js:9:21433)
at s (D:\Connectify.next\server\chunks\9609.js:1:5884)
at I (D:\Connectify.next\server\chunks\9609.js:1:4669)
at H (D:\Connectify.next\server\chunks\6296.js:1:5625)
at l (D:\Connectify.next\server\app\api\servers[serverId]\route.js:1:3986)
at d (D:\Connectify.next\server\app\api\direct-messages\route.js:1:1025)
at D:\Connectify\node_modules\next\dist\compiled\next-server\app-route.runtime.prod.js:6:36963
at D:\Connectify\node_modules\next\dist\server\lib\trace\tracer.js:140:36
at NoopContextManager.with (D:\Connectify\node_modules\next\dist\compiled@opentelemetry\api\index.js:1:7062) {
description: "Route /api/direct-messages couldn't be rendered statically because it used headers. See more info here: https://nextjs.org/docs/messages/dynamic-server-error",
digest: 'DYNAMIC_SERVER_USAGE'
} DIRECT MESSAGES API ERROR
✓ Generating static pages (14/14)
✓ Collecting build traces
✓ Finalizing page optimization

Route (app) Size First Load JS
┌ ƒ / 5.65 kB 276 kB
├ ƒ /_not-found 872 B 88.1 kB
├ ƒ /api/channels 0 B 0 B
├ ƒ /api/channels/[channelId] 0 B 0 B
├ ƒ /api/direct-messages 0 B 0 B
├ ƒ /api/get-participant-token 0 B 0 B
├ ƒ /api/members/[memberId] 0 B 0 B
├ ƒ /api/messages 0 B 0 B
├ ƒ /api/servers 0 B 0 B
├ ƒ /api/servers/[serverId] 0 B 0 B
├ ƒ /api/servers/[serverId]/invite-code 0 B 0 B
├ ƒ /api/servers/[serverId]/leave 0 B 0 B
├ ƒ /api/uploadthing 0 B 0 B
├ ○ /apple-icon.png 0 B 0 B
├ ○ /icon.png 0 B 0 B
├ ƒ /invite/[inviteCode] 146 B 87.3 kB
├ ƒ /rome 1.49 kB 204 kB
├ ƒ /servers/[serverId] 146 B 87.3 kB
├ ƒ /servers/[serverId]/channels/[channelId] 178 B 513 kB
├ ƒ /servers/[serverId]/conversations/[memberId] 178 B 513 kB
├ ƒ /sign-in/[[...sign-in]] 193 B 113 kB
└ ƒ /sign-up/[[...sign-up]] 193 B 113 kB

  • First Load JS shared by all 87.2 kB
    ├ chunks/117-0b3dade9db1b029e.js 31.6 kB
    ├ chunks/fd9d1056-70098c977cddd79d.js 53.6 kB
    └ other shared chunks (total) 1.97 kB

Route (pages) Size First Load JS
┌ ƒ /api/socket/direct-messages 0 B 79.2 kB
├ ƒ /api/socket/direct-messages/[directMessageId] 0 B 79.2 kB
├ ƒ /api/socket/io 0 B 79.2 kB
├ ƒ /api/socket/messages 0 B 79.2 kB
└ ƒ /api/socket/messages/[messageId] 0 B 79.2 kB

  • First Load JS shared by all 79.2 kB
    ├ chunks/framework-f66176bb897dc684.js 44.8 kB
    ├ chunks/main-ea3c13f22a78d403.js 32.4 kB
    └ other shared chunks (total) 1.95 kB

ƒ Middleware 61 kB

○ (Static) prerendered as static content
ƒ (Dynamic) server-rendered on demand

D:\Connectify>npm start

[email protected] start
next start

▲ Next.js 14.2.15

✓ Starting...
✓ Ready in 344ms
{
id: 'cm235bw3o0000sf9nm5kq9ckz',
userId: 'user_2nF4Mv4xBO3Hl6LjhJaQaHqqAAb',
name: 'Erque',
email: '[email protected]',
imageUrl: 'https://img.clerk.com/---------',
createdAt: 2024-10-10T10:18:46.213Z,
updatedAt: 2024-10-10T10:18:46.213Z
}
e [Error]
at X.r [as request] (D:\Connectify.next\server\chunks\9609.js:14:23904)
at async d (D:\Connectify.next\server\chunks\9848.js:1:6943)
at async y (D:\Connectify.next\server\chunks\7100.js:1:11745) {
toString: [Function (anonymous)],
status: undefined,
clerkTraceId: '',
clerkError: true,
errors: [
{
code: 'unexpected_error',
message: 'Response.clone: Body has already been consumed.'
}
],
digest: '113889356'
}
e [Error]
at X.r [as request] (D:\Connectify.next\server\chunks\9609.js:14:23904)
at async d (D:\Connectify.next\server\chunks\9848.js:1:6943)
at async y (D:\Connectify.next\server\chunks\7100.js:1:11745) {
toString: [Function (anonymous)],
status: undefined,
clerkTraceId: '',
clerkError: true,
errors: [
{
code: 'unexpected_error',
message: 'Response.clone: Body has already been consumed.'
}
],
digest: '113889356'
}

@Erquexd
Copy link
Author

Erquexd commented Oct 14, 2024

e [Error]
at X.r [as request] (D:\Connectify.next\server\chunks\9609.js:14:23904)
at async d (D:\Connectify.next\server\chunks\9848.js:1:6943)
at async y (D:\Connectify.next\server\chunks\7100.js:1:11745) {
toString: [Function (anonymous)],
status: undefined,
clerkTraceId: '',
clerkError: true,
errors: [
{
code: 'unexpected_error',
message: 'Response.clone: Body has already been consumed.'
}
],
digest: '113889356'
}
e [Error]
at X.r [as request] (D:\Connectify.next\server\chunks\9609.js:14:23904)
at async d (D:\Connectify.next\server\chunks\9848.js:1:6943)
at async y (D:\Connectify.next\server\chunks\7100.js:1:11745) {
toString: [Function (anonymous)],
status: undefined,
clerkTraceId: '',
clerkError: true,
errors: [
{
code: 'unexpected_error',
message: 'Response.clone: Body has already been consumed.'
}
],
digest: '113889356'
}
⨯ TypeError: Cannot read properties of undefined (reading 'bind')
at NextNodeServer.handleRequestImpl (D:\Connectify\node_modules\next\dist\server\base-server.js:475:50)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

@haciosman
Copy link

Hello.
I got everything working without any problems but I'm having problems with the API. I edit the API keys in the env file. But when uploading an image, it gives an error saying invalid api key must start with sk. I check my api keys from the clerk site and they are all correct. How do I solve this problem?

@issam-seghir
Copy link
Owner

Hello. I got everything working without any problems but I'm having problems with the API. I edit the API keys in the env file. But when uploading an image, it gives an error saying invalid api key must start with sk. I check my api keys from the clerk site and they are all correct. How do I solve this problem?

make sure you follow the doc when config uploadthing
api start with "sk" is from uploadthing not from clerk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants