Closed aptiway-dev-app closed 3 years ago
@aptiway-dev-app how do you run this application? with typescript (node --require ts-node/register) or are you compiling it? If you are compiling your application, what kind of module are you using? commonjs, amd, umd?
If you don't use typescript, you cant use the "import" statement, try to add to your package.json file: "type": "module",
.
@aptiway-dev-app please let me know if you have any more issues, i close this issue for now
Following is my code to take backup of users collection;
For above code, it generates following error:
internal/modules/cjs/loader.js:1149 throw new ERR_REQUIRE_ESM(filename, parentPath, packageJsonPath); ^
node version - v12.16.3
Kindly help resolving this issue.
Once this runs, my final objective is to take backup from Mongodb hosted on atlas.