O que aparece no terminal do meu vscode:
Error: node:internal/errors:466 ErrorCaptureStackTrace(err); ^
TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".tmp" for c:\Users\AlDev\Documents\Oracle+Alura\JavaScriptPOO\node_1371eac584884.tmp at new NodeError (node:internal/errors:377:5) at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:80:11) at defaultGetFormat (node:internal/modules/esm/get_format:122:38) at defaultLoad (node:internal/modules/esm/load:21:20) at ESMLoader.load (node:internal/modules/esm/loader:431:26) at ESMLoader.moduleProvider (node:internal/modules/esm/loader:350:22) at new ModuleJob (node:internal/modules/esm/module_job:66:26) at #createModuleJob (node:internal/modules/esm/loader:369:17) at ESMLoader.getModuleJob (node:internal/modules/esm/loader:328:34) at async Promise.all (index 0) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }
Node.js v18.3.0
Meu package: { "name": "bytebank", "version": "1.0.0", "description": "Projeto do bytebank para seus clientes", "main": "index.js", "scripts": { "test": "echo "Error: no test specified" && exit 1" }, "author": "Aldevan", "license": "ISC", "type": "module" }
Meu codigo:
import {Cliente} from "./Cliente" import { ContaCorrente} from "./ContaCorrente";
const cliente1 = new Cliente(); cliente1.nome = "Aldevan"; cliente1.cpf = 11122233355;
const cliente2 = new Cliente(); cliente2.nome = "Cleisianne"; cliente2.cpf = 88822233344;
const contaCorrenteA = new ContaCorrente(); contaCorrenteA.agencia = 1010contaCorrenteA.depositar(-100); contaCorrenteA.depositar(100); contaCorrenteA.depositar(100);
const valorSacado = contaCorrenteA.sacar(50) console.log(valorSacado)
console.log(contaCorrenteA)
Não estou conseguindo resolver e quem puder me ajudar eu agradeço.