We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca7cec8 commit 6309d47Copy full SHA for 6309d47
src/Routers/CloudCodeRouter.js
@@ -136,7 +136,7 @@ export class CloudCodeRouter extends PromiseRouter {
136
}
137
static getCloudFile(req) {
138
const file = req.url.replace('/scripts', '');
139
- const dirName = __dirname.split('lib')[0];
+ const dirName = __dirname.split('lib')[0].split('node_modules')[0];
140
const filePath = path.join(dirName, file);
141
if (!fs.existsSync(filePath) || !fs.lstatSync(filePath).isFile()) {
142
throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Invalid file url.');
0 commit comments