PS C:\Users\lenovo\Desktop\obj-js> node index.js
(node:1604) Warning: To load an ES module, set "type": "module" in
or use the .mjs extension.
(Use node --trace-warnings ...
to show where the warning was cre
PS C:\Users\lenovo\Desktop\obj-js> npm init
This utility will walk you through creating a package.json file.
It only covers the most common items, and tries to guess sensible
See npm help init
for definitive documentation on these fields
and exactly what they do.
Use npm install <pkg>
afterwards to install a package and
save it as a dependency in the package.json file.
Press ^C at any time to quit. package name: (obj) goldbyte version: (1.0.0) description: Projeto goldbyte soluções inteligentes entry point: (index.js) test command: git repository: keywords: author: L-Farias license: (ISC) About to write to C:\Users\lenovo\Desktop\obj-js\package.json:
{ "name": "goldbyte", PS C:\Users\lenovo\Desktop\obj-js> node index.js file:///C:/Users/lenovo/Desktop/obj-js/index.js:35 import { ContaCorrente } from "./ContaCorrente"; PS C:\Users\lenovo\Desktop\obj-js> node index.js internal/process/esm_loader.js:74 internalBinding('errors').triggerUncaughtException( ^ PS C:\Users\lenovo\Desktop\obj-js> node index.js file:///C:/Users/lenovo/Desktop/obj-js/index.js:34 import { Cliente } from "../Cliente"; PS C:\Users\lenovo\Desktop\obj-js> node index.js file:///C:/Users/lenovo/Desktop/obj-js/index.js:34 import { Cliente } from "./Cliente.js"; ^^^^^^^
SyntaxError: Identifier 'Cliente' has already been declared at Loader.moduleStrategy (internal/modules/esm/translators.js:145:18) at async link (internal/modules/esm/module_job.js:64:21) PS C:\Users\lenovo\Desktop\obj-js>