D
Deno

help

Cannot read file "src/deno.json": not implemented on js

KSB"Kin" suka bakso9/7/2023
Hey @Deno AI Helper ! I'm having a bit of trouble, I'm trying to use deno.land/x/import to use non statycalize analyze dynamic import, but I get errors when trying to load events for my Client class
Error: Build failed with 2 errors:
error: Cannot read file "src/deno.json": not implemented on js
error: Cannot read file "src/deno.json": not implemented on js
at failureErrorWithLog (https://deno.land/x/esbuild@v0.19.1/wasm.js:1625:15)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1034:25
at runOnEndCallbacks (https://deno.land/x/esbuild@v0.19.1/wasm.js:1460:45)
at buildResponseToResult (https://deno.land/x/esbuild@v0.19.1/wasm.js:1032:7)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1061:16
at responseCallbacks.<computed> (https://deno.land/x/esbuild@v0.19.1/wasm.js:679:9)
at handleIncomingPacket (
https://deno.land/x/esbuild@v0.19.1/wasm.js:738:9)
at readFromStdout (https://deno.land/x/esbuild@v0.19.1/wasm.js:655:7)
at Object.worker.onmessage (https://deno.land/x/esbuild@v0.19.1/wasm.js:1801:38)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1786:1084
Error: Build failed with 2 errors:
error: Cannot read file "src/deno.json": not implemented on js
error: Cannot read file "src/deno.json": not implemented on js
at failureErrorWithLog (https://deno.land/x/esbuild@v0.19.1/wasm.js:1625:15)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1034:25
at runOnEndCallbacks (https://deno.land/x/esbuild@v0.19.1/wasm.js:1460:45)
at buildResponseToResult (https://deno.land/x/esbuild@v0.19.1/wasm.js:1032:7)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1061:16
at responseCallbacks.<computed> (https://deno.land/x/esbuild@v0.19.1/wasm.js:679:9)
at handleIncomingPacket (
https://deno.land/x/esbuild@v0.19.1/wasm.js:738:9)
at readFromStdout (https://deno.land/x/esbuild@v0.19.1/wasm.js:655:7)
at Object.worker.onmessage (https://deno.land/x/esbuild@v0.19.1/wasm.js:1801:38)
at https://deno.land/x/esbuild@v0.19.1/wasm.js:1786:1084
here is the link to my code https://github.com/k1iin/akane-v2/blob/3bb1da3c3e76ea83f2e7b7e94bdbd83a523071c0/main.ts
GitHub
akane-v2/main.ts at 3bb1da3c3e76ea83f2e7b7e94bdbd83a523071c0 · k1ii...
🦕 a kawaii discord bot written in typescript with the deno deploy runtime - k1iin/akane-v2
DAHDeno AI Helper9/7/2023
I'm sorry, but based on the documentation, I can't provide a specific solution to your problem. The error message you're seeing suggests that the file "src/deno.json" cannot be read, which might be due to a variety of reasons such as incorrect file path, lack of necessary permissions, or the file not existing. However, the documentation does provide some general advice for debugging issues. First, you could check if the file "src/deno.json" exists and is in the correct location. If the file does exist, you might need to provide the --allow-read flag when running your Deno program to give it the necessary permissions to read the file. If you're still having trouble, you might want to ask for help in the Deno discord or create an issue on the Deno issue tracker.
KSB"Kin" suka bakso9/7/2023
how do i give the --allow-read flag, i'm using deno deploy
DAHDeno AI Helper9/7/2023
I'm sorry to hear that you're having trouble. Based on the error message you provided, it seems like the issue is related to reading the deno.json file. In Deno, you can use a deno.json file as an import map. This allows you to specify imports and scopes keys in your configuration file and Deno will automatically start treating the configuration file as an import map. Here's an example from the documentation:
{
"imports": {
"std/": "https://deno.land/std@0.174.0/"
}
}
{
"imports": {
"std/": "https://deno.land/std@0.174.0/"
}
}
However, the error message you're seeing suggests that there's an issue with reading this file. It's possible that the file doesn't exist, or there's a problem with the file path. I recommend checking the following: 1. Ensure that the deno.json file exists in the src directory. 2. Check that the file path is correct. If your deno.json file is not in the src directory, you'll need to update the file path accordingly. 3. Make sure that you have the necessary permissions to read the file. If you're still having trouble after checking these things, could you provide more information about your setup? Specifically, it would be helpful to know how you're running your Deno script and the contents of your deno.json file.

Looking for more? Join the community!