2saturdayscode
2saturdayscode
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
I think that it does not make sense the switch for you, if your project is already tied that much to the Node runtime it really does not make sense to switch
16 replies
DDeno
Created by siriustherecklessking on 9/1/2024 in #help
S is Not Async Iterable
6 replies
DDeno
Created by siriustherecklessking on 9/1/2024 in #help
S is Not Async Iterable
third all the @std packages are on jsr now so don't use deno.land https://jsr.io/@std
6 replies
DDeno
Created by siriustherecklessking on 9/1/2024 in #help
S is Not Async Iterable
second a copy paste of the code would have been better than pictures, just open discord from the broswer
6 replies
DDeno
Created by siriustherecklessking on 9/1/2024 in #help
S is Not Async Iterable
First of all serve returns Promise<void> so I dont know why do you expect it to work
6 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
also I've found that maybe you can can omit file extension by enabling an unstable feature in the deno config file like this
{
"unstable": ["unstable-sloppy-imports"]
}
{
"unstable": ["unstable-sloppy-imports"]
}
Read more about it here: https://docs.deno.com/runtime/manual/tools/unstable_flags/#--unstable-sloppy-imports
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
ctrl+shift+p and write something like "deno restart"
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
try restarting the deno server language
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
Uhmmm this is very strange it should work
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
Can you show me the deno.jsonc?
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
For the latter it's not possible, file extension must be explicit
16 replies
DDeno
Created by MelodyMaker on 8/30/2024 in #help
How to resolve an import statement in Deno
HI! You can use an import map specified in your deno.json config file like this:
imports: {
"@root/": "./packages/"
}
imports: {
"@root/": "./packages/"
}
16 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
True, but since nobody does import { process } from '???' you can't just add an entry to the import map. It needs to be defined somehow at bundling time (to replace it with something from Deno)
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
What version of Deno are you using?
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
uhmm this is harder you, since process is not an import, but it does not mean anything outside Node
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
Well at least it solved the other problem. Process should not be much different I think it behaves as an implicit import give me a couple of mins to test a potential solution
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
If you still have any issue let me know
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
Why? Since Deno is not Node importing fs/promises does not make any sense to it, this is why you have to tell it what's exactly you are trying to import by creating an import map
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
1. create a deno.json file in the root of your project (where you call that command from). 2. In that deno.json config file add the following:
{
"imports": {
"fs/promises": "node:fs/promises"
}
}
{
"imports": {
"fs/promises": "node:fs/promises"
}
}
3. Done! Now you can run your command easily
21 replies
DDeno
Created by Sheik on 8/23/2024 in #help
Angular SSR Deno
so this is what you have to do:
21 replies