parse-community / parse-community/parse-server
Cannot specify cloud file string using ES Module
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
When using Parse Server with "type": "module", it is not possible to set a cloud string, as it returns Must use import to load ES Module.
Steps to reproduce
Create a Parse Server with "type": "module" (such as https://github.com/parse-community/parse-server-example/pull/400), set cloud file string
Actual Outcome
Error: Must use import to load ES Module: /Users/daniel/GitHub/parse-server-example/cloud/main.js
require() of ES modules is not supported.
Expected Outcome
Cloud function to work
Workaround
() => import('./cloud/main.js'),
Environment
Server
- Parse Server version:
4.10.3 - Operating system:
MacOS - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Localhost
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with Parse Server configured as an ES module and a cloud file at cloud/main.js, starting with the cloud file string loading path. Compare the failing require() behavior with the documented dynamic-import workaround; done means the cloud function loads and works without that workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100