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
I am in the process of migrating to our own hosted parse-server and am going through setting it up locally. I am at the point where I am trying to run the cloud code locally. I moved it over to the /cloud directory in the parse-server-example directory. I then saw the note about modifying local paths to have ./ infront of the cloud path, and I noticed looking at the structure of the folders why that makes sense, with main.js being in the /cloud directory, it has to go down, then back into the cloud directory to find the modules directory.
I had a require('cloud/modules/file.js') which worked fine in the Parse.com server.
I changed it to require('./cloud/modules/file.js') as stated in the tutorial, however I am getting that error that is in the topic title.
Is there a step that I am missing or something? Everything looks to be correct path wise so I'm a bit baffled as to why this is not working.
The text was updated successfully, but these errors were encountered:
I think I had the same issue before. It depends on the location of your file that requires the file.js.
I have file structure like so:
cloud/
|__main.js
|__modules/
|__file.js
My main.js, located in the cloud/ folder, requires file.js in the cloud/modules/ folder, changing the require path in my main.js to require('./modules/file.js') fixes the issue.
@refre5h thanks for the hint, that was the problem. I also had to fix some paths down in other modules as well, but it looks like I got it up and running now! Thanks again!
I am in the process of migrating to our own hosted parse-server and am going through setting it up locally. I am at the point where I am trying to run the cloud code locally. I moved it over to the /cloud directory in the parse-server-example directory. I then saw the note about modifying local paths to have ./ infront of the cloud path, and I noticed looking at the structure of the folders why that makes sense, with main.js being in the /cloud directory, it has to go down, then back into the cloud directory to find the modules directory.
I had a require('cloud/modules/file.js') which worked fine in the Parse.com server.
I changed it to require('./cloud/modules/file.js') as stated in the tutorial, however I am getting that error that is in the topic title.
Is there a step that I am missing or something? Everything looks to be correct path wise so I'm a bit baffled as to why this is not working.
The text was updated successfully, but these errors were encountered: