Skip to content

Lesson:10 Cannot read property 'readFileSync' of undefined #1147

Discussion options

You must be logged in to vote

The error is because of this line

const { fs } = require("fs")

change it to

const fs = require("fs")

And your error will be solved

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Sunil-Reddy-Gummalla
Comment options

@alymurtazamemon
Comment options

@Sunil-Reddy-Gummalla
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Sunil-Reddy-Gummalla
Comment options

@adityabhattad2021
Comment options

Answer selected by Sunil-Reddy-Gummalla
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants