lasse
lasse7mo ago

Deno deploy see error

How can i see the error why my build failed? It just returned Error An internal server error occurred. not much to see why it failed
10 Replies
Deno AI Helper
Deno AI Helper7mo ago
I'm sorry to hear that you're experiencing issues with your Deno Deploy build. The error message you're seeing is quite generic and doesn't provide specific details about what went wrong. However, Deno Deploy has a feature called "Crash Reports" which consist of the 100 lines of logs before any unhandled exception. This might provide more insight into what caused the error. You can access these logs through the Deno Deploy dashboard. If the error persists and the logs do not provide enough information, it might be helpful to check your code for any potential issues. If you're still unable to resolve the issue, you might want to consider reaching out to the Deno community or support for further assistance. Remember, this advice isn't explicitly in the documentation, but it's a general approach to debugging issues like this. 🦕
lasse
lasse7mo ago
It says it can't find a file
Deno AI Helper
Deno AI Helper7mo ago
The error message you're seeing might be related to the Deno.errors.NotFound error. According to the documentation, this error is raised when the underlying operating system indicates that a file was not found. Here are a few steps you can take to debug this issue: 1. Check the file path: Make sure that the file path you're using in your code is correct. The path might be relative to the current working directory, and if the file is not there, this error can occur. 2. File existence: Ensure that the file actually exists in the path you're referencing. You can check this manually by navigating to the file path in your system. 3. Permissions: Make sure that Deno has the necessary permissions to access the file. If Deno doesn't have the required permissions, it might not be able to find the file, even if it exists. 4. Case sensitivity: File paths in Deno are case-sensitive. Ensure that the case of the file path in your code matches the case of the actual file path. If you've checked all of these and you're still seeing the error, there might be an issue with your Deno installation or your system. In that case, you might want to reach out to the Deno community or support for further assistance.
marvinh.
marvinh.7mo ago
@lasse If you go to your project on Deno Deploy there is a tab "Deployments". There you'll see which deployment failed and can inspect the build log
lasse
lasse7mo ago
It says it can't find src/events/ready.ts but every thing works local
marvinh.
marvinh.7mo ago
does the file exist in your project? How are you referencing that?
lasse
lasse7mo ago
Here is the project structure. And this is where i find the files with Deno.cwd
new CommandKit({
client,
commandsPath: `${Deno.cwd()}/src/commands`, // Use Deno.cwd() to get the current working directory
eventsPath: `${Deno.cwd()}/src/events`, // Use Deno.cwd() to get the current working directory
skipBuiltInValidations: true,
bulkRegister: true,
});
new CommandKit({
client,
commandsPath: `${Deno.cwd()}/src/commands`, // Use Deno.cwd() to get the current working directory
eventsPath: `${Deno.cwd()}/src/events`, // Use Deno.cwd() to get the current working directory
skipBuiltInValidations: true,
bulkRegister: true,
});
No description
marvinh.
marvinh.7mo ago
Thanks for sharing more information. I've investigated a little bit and it looks like the command-kit npm package uses a dynamic import whose import path cannot be determined at compile time without running the code:
await import(`${modulePath}?t=${Date.now()}`)
await import(`${modulePath}?t=${Date.now()}`)
Those kind of imports don't work on Deno Deploy as it expects to be able to detect any import path upfront. I'm afraid it looks like the command-kit library is not a good fit for Deno Deploy at the moment.
lasse
lasse7mo ago
Alright thanks for your help! @marvinh. So there is no other to solve the problem?
marvinh.
marvinh.7mo ago
no dynamic imports must be statically analyzable in Deno Deploy