maleck13 / readline

read line module for node js
93 stars 27 forks source link

Module not found: Error: Can't resolve 'fs' in readline.js #29

Open fridolinvii opened 2 years ago

fridolinvii commented 2 years ago

I am trying to import input in my App.js file import input from 'input';

However I get the following issue: Module not found: Error: Can't resolve 'fs' in './node_modules/readline'

I already tried

Kazbonfim commented 3 months ago

Tried this instead? (just look at the starting lines, as i'm learning node and its correlatives now)

`const fs = require('fs'); // File System; const path = require('path');

const filePath = path.join('D:', 'Faculdade', 'cursoDeNode', 'MatheusBattisti', '1_INTRO', '2_usando_modulos', 'arquivo.txt') console.log(filePath);

// fs.readFile([arquivo], [syntax], [try/catch]) fs.readFile(filePath, 'utf8', (err, data) => { if (err) { console.log(err); } console.log(data); });

// Sucesso!! `