Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

143
Visualizações
Using CSV node module in chrome extension

I am trying to make an extension for chrome and one of the needed functionality is to make it possible to save user's data locally (But I do plan to integrate Gdrive saving). I wanted to save user's data into CSV assuming that it would be easier but it turned out a disaster.

I have tried many different methods in order to make it possible but it seems like it's no use.

Here's part of the code that doesn't work:

    var { parse } = require('csv-parse');

    const fs = require("chrome-fs");
    const records = [];

    const csvFile = chrome.runtime.getURL("save_file.csv");

    var parser = parse({ columns: true }, function(err, records) {
        console.log(records);
    });

    fs.createReadStream(chrome.runtime.getURL("save_file.csv")).pipe(parser);

and here's an error that browser throws at me when I try to initialize this code:

Uncaught Error
    at chrome.js:511:1
    if (err.name === 'NotFoundError') {
            var enoent = new Error()
511:        enoent.code = 'ENOENT'
            callback(enoent)

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda