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
Can't import fs module #5630
Comments
The following code on Deno 1.0 works for me:
Running with |
I upgraded my Typescript to 3.9.2 but still had the same issue. However, adding version lock solved the problem. Thanks @galkowskit! |
Can we discuss this further? I've had the exact same issue with the Why is this happening? And how should I, as a new user of Deno, know about this? I was just following the example code from the README at https://deno.land/std/fs#writefilestr - maybe there could be a note about pinning to a version instead of using master? The first time I checked the page I also didn't see the version switch at the top. |
There is a note about it. Literally in the How To Use for There is a reason std it is not 1.0 yet. I'd guess the error comes from type changes that could be introduced in Deno but were not backwards compatible so old std versions got broken. Have you tried 0.52.0 on Deno 1.0.2? It works for me.
Works with |
I'm sorry, I missed the note in the README of std - I was looking at the README of the fs module (https://deno.land/std@0.52.0/fs). I'm not sure which docs I read but it caught me off guard and as someone with no experience in TypeScript I was very confused until I found this issue thread. |
Yeah. It would be nice if the docs showed the versionlocked examples. |
I have this code but does not work for me
|
Did you run your app with |
I am trying to import "fs" module
but I have the following error:
I run the app with unstable flag.
TS version: 3.7.2
The text was updated successfully, but these errors were encountered: