Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
Tensorflow path of file isn't valid

so I'm trying to set up a very basic tfjs project but am stuck in an early part of getting it running. Running into a file path not found error: 'Error: ENOENT: no such file or directory'. My code looks like this:

const tf = require('@tensorflow/tfjs')
require('@tensorflow/tfjs-node')

async function test_function() {
    const house_sales_dataset = tf.data.csv('file://./datasets/kc_house_data.csv');
    const sample = house_sales_dataset.take(10);
    try {
        const dataArray = await sample.toArray();
    } catch(err) {
        console.log(err)
    }
}

test_function();

My file structure for the npm project is the following:

Root project directory is called 'tensorflow-practice'. Inside this is app.js, package.json, package-lock.json, node-modules, and a folder called 'datasets'. Inside 'datasets' folder is the .csv file called 'kc_house_data.csv'.

https://imgur.com/a/jWLr3wt

Not sure why this isn't working...any help much appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!