You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the npm run dev:with-minio command, an error occurs because the exports keyword is not defined in ES module scope. This is caused by the project's "type": "module" setting in package.json conflicting with the CommonJS syntax in minioInstallationCheck.js.
To Reproduce
Steps to reproduce the behavior:
Clone the Talawa-API repository.
Navigate to the project directory.
Run npm install to install dependencies.
Execute the command npm run dev:with-minio.
Expected behavior
The npm run dev:with-minio command should execute without errors, successfully validating MinIO setup and starting the API server.
Actual behavior
The command fails with the following error:
file:///C:/Shreyas/Project/talawa-api/build/minioInstallationCheck.js:49
Object.defineProperty(exports, "__esModule", { value: true });
^
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Shreyas\Project\talawa-api\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Screenshots
Additional details
The error occurs because the minioInstallationCheck.js file is treated as an ES module due to the "type": "module" configuration in package.json, but it uses CommonJS syntax (exports).
Suggested Fix
Convert minioInstallationCheck.js to ES module syntax by replacing exports with export default or named exports.
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
I’d like to work on this issue. Could you please assign it to me?
My plan is to start by converting minioInstallationCheck.js to ES Module syntax since the project seems to be set up for ESM. If this doesn't work, I can try treating the file as CommonJS by renaming it
@Shreyas2309@palisadoes@dhanagopu . I actually cloned the entire repository and set it up perfectly . And on running npm run dev : with-minio I don't get this error message . Could you just guide me over it .
Describe the bug
When running the npm run dev:with-minio command, an error occurs because the exports keyword is not defined in ES module scope. This is caused by the project's "type": "module" setting in package.json conflicting with the CommonJS syntax in minioInstallationCheck.js.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The npm run dev:with-minio command should execute without errors, successfully validating MinIO setup and starting the API server.
Actual behavior
The command fails with the following error:
file:///C:/Shreyas/Project/talawa-api/build/minioInstallationCheck.js:49
Object.defineProperty(exports, "__esModule", { value: true });
^
ReferenceError: exports is not defined in ES module scope
This file is being treated as an ES module because it has a '.js' file extension and 'C:\Shreyas\Project\talawa-api\package.json' contains "type": "module". To treat it as a CommonJS script, rename it to use the '.cjs' file extension.
Screenshots
Additional details
The error occurs because the minioInstallationCheck.js file is treated as an ES module due to the "type": "module" configuration in package.json, but it uses CommonJS syntax (exports).
Suggested Fix
Convert minioInstallationCheck.js to ES module syntax by replacing exports with export default or named exports.
Potential internship candidates
Please read this if you are planning to apply for a Palisadoes Foundation internship
The text was updated successfully, but these errors were encountered: