parse-server
parse-server copied to clipboard
Cannot use import statement outside a module
New Issue Checklist
- [x] I am not disclosing a vulnerability.
- [x] I am not just asking a question.
- [x] I have searched through existing issues.
- [x] I can reproduce the issue with the latest version of Parse Server.
Issue Description
When running cmd : parse-server --appId APPLICATION_ID --clientKey CLIENT_KEY --masterKey MASTER_KEY --databaseURI mongodb://localhost/test I get error as mentioned in the title
Steps to reproduce
Run parse-server --appId APPLICATION_ID --clientKey CLIENT_KEY --masterKey MASTER_KEY --databaseURI mongodb://localhost/test and use es6(import/export)
Actual Outcome
Getting error `import { CreateUserRequestModel } from "models/users/UserModels"; ^^^^^^
SyntaxError: Cannot use import statement outside a module
at compileFunction (
Expected Outcome
Should compile
Environment
4.5.0
Server
- Parse Server version:
4.5.0 - Operating system:
windows 11 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
local cloud-code
Database
- System (MongoDB or Postgres):
MongoDB - Database version:
4.8.1 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
local mongodb-runner
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
javascript - SDK version:
2.2.5
Logs
warn: DeprecationWarning: The Parse Server option 'directAccess' default will change to 'true' in a future version. Additionally, the environment variable 'PARSE_SERVER_ENABLE_EXPERIMENTAL_DIRECT_ACCESS' will be deprecated and renamed to 'PARSE_SERVER_DIRECT_ACCESS' in a future version; it is currently possible to use either one. warn: DeprecationWarning: The Parse Server option 'enforcePrivateUsers' default will change to 'true' in a future version. C:\source\teach_and_learn_teacher\Teach_And_Learn_B4A_Cloud_Code\cloud\controllers\teachersControllers\createUserTeacher.ts:1 import { CreateUserRequestModel } from "models/users/UserModels"; ^^^^^^
SyntaxError: Cannot use import statement outside a module
at compileFunction (
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: nachocodoner
:x: step-security-bot
You have signed the CLA already but the status is still pending? Let us recheck it.
Deploy Preview for v3-migration-docs canceled.
| Name | Link |
|---|---|
| Latest commit | ac963a9929a9b32515c60384f160ab8b8d900bc7 |
| Latest deploy log | https://app.netlify.com/sites/v3-migration-docs/deploys/670529dc20000f0008159285 |
Deploy Preview for v3-meteor-api-docs canceled.
| Name | Link |
|---|---|
| Latest commit | ac963a9929a9b32515c60384f160ab8b8d900bc7 |
| Latest deploy log | https://app.netlify.com/sites/v3-meteor-api-docs/deploys/670529dcb692ad0008ad2614 |
@nachocodoner any update on merging this?