FAQ: Browser Compatibility and Transpilation - Transpilation With Babel

so I run “npm run build” and I get all these errors…The girl that did the lesson or their environment or something is wrong. I am not getting results here.

$ npm run build

learn-javascript-transpilation-transpilation-project@1.0.0 build /home/ccuser/workspace/learn-javascript-transpilation-transpilation-project
babel src -d lib

You have mistakenly installed the babel package, which is a no-op in Babel 6.
Babel’s CLI commands have been moved from the babel package to the babel-cli package.

npm uninstall -g babel
npm install --save-dev babel-cli

See http://babeljs.io/docs/usage/cli/ for setup instructions.

npm ERR! Linux 4.14.181-142.260.amzn2.x86_64
npm ERR! argv “/usr/bin/nodejs” “/usr/bin/npm” “run” “build”
npm ERR! node v7.10.1
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! learn-javascript-transpilation-transpilation-project@1.0.0 build: babel src -d lib
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the learn-javascript-transpilation-transpilation-project@1.0.0 build script ‘babel src -d lib’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the learn-javascript-transpilation-transpilation-project package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel src -d lib
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs learn-javascript-transpilation-transpilation-project
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls learn-javascript-transpilation-transpilation-project
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /home/ccuser/.npm/_logs/2020-10-02T00_44_49_843Z-debug.log

Hi,
When I run the main.js I get an error in command line 9 BEFORE even starting doing the steps of the project, I have no idea what´s wrong since syntax looks correct (or maybe i am missing it). It says issue is in the get name() part…
Can you help?

class HospitalEmployee {
  constructor(name) {
    this._name = name;
    this._remainingVacationDays = 20;
    
}
  }
  
  get name() {
    return this._name;
  }
  
  get remainingVacationDays() {
    return this._remainingVacationDays;
  }
  
  takeVacationDays(daysOff) {
    this._remainingVacationDays -= daysOff;
  }
  
  static generatePassword() {
    return Math.floor(Math.random()*10000);
  }
}

class Nurse extends HospitalEmployee {
  constructor(name, certifications) {
    super(name);
    this._certifications = certifications;
  } 
  
  get certifications() {
    return this._certifications;
  }
  
  addCertification(newCertification) {
    this.certifications.push(newCertification);
  }
} 

const nurseOlynyk = new Nurse('Olynyk', ['Trauma','Pediatrics']);
let nurseDurant = new Nurse('Durant', ['Orthopedics']);
nurseOlynyk.takeVacationDays(5);
console.log(nurseOlynyk.remainingVacationDays);
nurseOlynyk.addCertification('Genetics');
console.log(nurseOlynyk.certifications);

module.exports = HospitalEmployee;

Thank you! This is exactly what I needed.

So I can “pass” this lesson by typing in all the commands, but all I get back is a giant list of errors. There’s no lib folder, and refreshing as suggested just clears the lesson. I know what command prompt is, but I’ve never really used it - was this a prerequisite for javascript that I missed somehow? I appreciate all the links to tutorialspoint.com/babeljs/ but I feel like I’ve suddenly been thrown in the deep end. What exactly was supposed to happen? Is this actually generating new files?

Sometimes I don’t understand CodeCademy. Were we just supposed to know this? Like what??

I don’t have a clue what I’m supposed to do with these exercises. They don’t mention what to type and the hints and solutions only show what’s in the JavaScript editor, not where we’re typing. Could someone please help? Thanks in advance.