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

237
Views
Node.js v18.3.0 "Export" and "Import" VS Code not working

Attempting to export a class and use as an extention for another class.. I've even tried module.export at the bottom and export class at the top. What am I doing wrong? Also tried changing to .mjs

File: -animal.js -dog.js -test.js

animal.js:

class Animal {
....
    
}

export {Animal}

dog.js:

import {Animal} from 'animal.js';

class Dog extends Animal{
...
}
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

There's not much setup details to go on, but one thing I noticed is your import path is absolute... which is generally reserved for node modules

import {Animal} from 'animal.js';

I'd expect it to be relative, more like

import {Animal} from '../animal';
or
import {Animal} from './animal';
about 4 years ago · Juan Pablo Isaza Report
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!