----------Index------------- import {Cliente} from "./Cliente.js" import {Gerente} from "./Funcionario/Gerente.js" import {Diretor} from "./Funcionario/Diretor.js" import {sistemaAutenticacao} from "./sistemaAutenticacao.js"
const diretor = new Diretor("Ricardo", 10000, 12345678900); const gerente = new Gerente("ricardo", 5000, 98765432100);
const estouLogado = sistemaAutenticacao.login( diretor, "12345");
console.log(estouLogado);
---------- Gerente-------------- import { funcionario } from "./Funcionario.js"
export class Gerente extends funcionario{ constructor(nome, salario, cpf){ super(nome, salario, cpf); this._bonificacao = 1.1; }
}
PS C:\Users\Aline\OneDrive\Documentos\JS> node C:\Users\Aline\OneDrive\Documentos\JS\index.js node:internal/process/esm_loader:74 internalBinding('errors').triggerUncaughtException( ^
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'C:\Users\Aline\OneDrive\Documentos\JS\Funcionario\Gerente.js' imported from C:\Users\Aline\OneDrive\Documentos\JS\index.js at new NodeError (node:internal/errors:329:5) at finalizeResolution (node:internal/modules/esm/resolve:323:11) at moduleResolve (node:internal/modules/esm/resolve:758:10) at Loader.defaultResolve [as resolve] (node:internal/modules/esm/resolve:869:11) at Loader.resolve (node:internal/modules/esm/loader:86:40) at Loader.getModuleJob (node:internal/modules/esm/loader:230:28) at ModuleWrap. (node:internal/modules/esm/modulejob:57:40) at link (node:internal/modules/esm/module_job:56:36) { code: 'ERR_MODULE_NOT_FOUND'