Skip to content

cloud code name cannot contain dot (.) #5138

Closed
@meepeek

Description

@meepeek

Before opening the issue please ensure that you have:

Issue Description

naming cloud function including dot '.' produce error

Steps to reproduce

adding this line in cloud, main.js

// cloud/main.js
Parse.Cloud.define('customer.create', async (req) => {})

Expected Results

success without error

Actual Outcome

/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/triggers.js:111
  store[lastComponent] = handler;
                       ^

TypeError: Cannot set property '[object Array]' of undefined
    at add (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/triggers.js:111:24)
    at Object.addFunction (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/triggers.js:127:3)
    at Object.ParseCloud.define (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/cloud-code/Parse.Cloud.js:42:12)
    at Object.<anonymous> (/Users/thee/Desktop/parse-base-system/services/data-server/cloud/main.js:36:13)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at new ParseServer (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/ParseServer.js:145:9)
    at Function.start (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/ParseServer.js:296:25)
    at start (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/cli/parse-server.js:84:22)
    at _default (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/cli/utils/runner.js:57:3)
    at Object.<anonymous> (/Users/thee/Desktop/parse-base-system/services/data-server/node_modules/parse-server/lib/cli/parse-server.js:38:21)

Environment Setup

  • Server

    • parse-server version (Be specific! Don't say 'latest'.) : 3.1.0
    • Operating System: OSX Heigh Sierra
    • Hardware: MacBook Air 2012
    • Localhost or remote server? (AWS, Heroku, Azure, Digital Ocean, etc): localhost
  • Database

    • MongoDB version: [FILL THIS OUT]
    • Storage engine: [FILL THIS OUT]
    • Hardware: [FILL THIS OUT]
    • Localhost or remote server? (AWS, mLab, ObjectRocket, Digital Ocean, etc): [FILL THIS OUT]

Logs/Trace

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions