Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATABASE_URI not specified, falling back to localhost when running npm start #3168

Closed
tailord opened this issue Dec 3, 2016 · 3 comments
Closed

Comments

@tailord
Copy link

tailord commented Dec 3, 2016

Describe your issue in as much detail as possible.

DATABASE_URI not specified, falling back to localhost when trying to run npm start

Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.

npm start
from parse_server_example directory

Expected Results

Start Parse Servr

Actual Outcome

DATABASE_URI not specified, falling back to localhost.
module.js:472
throw err;
^

Error: Cannot find module 'mailgun'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/alexgriswold/parse-server-example/cloud/main.js:3:15)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)

npm ERR! Darwin 14.5.0
npm ERR! argv "/usr/local/Cellar/node/7.2.0/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.2.0
npm ERR! npm v3.10.9
npm ERR! code ELIFECYCLE
npm ERR! parse-server-example@1.4.0 start: node index.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the parse-server-example@1.4.0 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the parse-server-example package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs parse-server-example
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls parse-server-example

Environment Setup

  • Server
    • parse-server version (Be specific! Don't say 'latest'.) :
    • Operating System: OSX 10.10.5
    • Hardware: macbook air 1.6 GHz Intel Core i5 4 GB 1600 MHz DDR3
    • Localhost or remote server? localhost
  • Database
    • MongoDB version: version: 3.0.13 (MMAPv1)
    • Storage engine: mlab
    • Hardware: aws
    • Localhost or remote server? mlab

Logs/Trace

You can turn on additional logging by configuring VERBOSE=1 in your environment.

[FILL THIS OUT]

@flovilmart
Copy link
Contributor

Error: Cannot find module 'mailgun'

Seems that the mailgun module is not present.

run npm install mailgun to install it (npm install --save mailgun if you wish to have it when you deploy)

@tailord
Copy link
Author

tailord commented Dec 3, 2016

I am not getting the following error:

TypeError: mailgun.initialize is not a function

main.js

// Email

var mailgun = require("mailgun");

mailgun.initialize("name", "key");
Parse.Cloud.define("sendEmail", function(request, response) {
mailgun.sendEmail({
to: request.params.to,
from: " Tailor'd postmaster@tailordapp.com",
subject: request.params.subject,
text: request.params.text
}, {
success: function(httpResponse) { response.success("Email sent!"); },
error: function(httpResponse) { response.error("Error: " + request.params + " to: " + request.params.to + " subject: " + request.params.subject + " text: " + request.params.text); }
});
});

@flovilmart
Copy link
Contributor

flovilmart commented Dec 3, 2016

It seems that you're not implementing mailgun correctly and that your cloud code hasn't been migrated yet.

Please look over mailgun node module documentation.

We don't provide code level support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants