-
Notifications
You must be signed in to change notification settings - Fork 41
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
Cannot read property 'Cloudinary' of undefined #94
Comments
Damn, I'm not sure really, I've never worked with heroku. Does it work locally? |
Yeah, I'm not sure either and was hoping someone may have seen this before so started here. It is working locally, though. Between using the latest meteor 1.4, heroku and cloudinary, all being fairly new to me, there's no telling at this point. I'm leaning toward a heroku deployment issue at this point, however. |
I had this recently (locally, not on deploy as I haven't tried that yet) and my issue was that I had to specify a |
That's very strange, lol, there's definitely nothing in the package requiring |
@jamesmacfie - unfortunately, I've used the --settings flag all along and it does run locally just fine for me. I only see this error when trying to run in heroku. I actually haven't revisited this however in a couple weeks due to other priorities so am just assuming the issue remains. @Lepozepo - I'm not importing it ( though I did try to once I saw issues just to see plus other things ) - just using the atmosphere package. Hopefully, I can look into it more this week - I'm still not so sure it's a cloudinary issue. |
This issue came up again when i tried to fit it all into Meteor's new directory structure.
in reference to this code. I have the keys in a settings.json file
The error appears only for the browser , not on the server. |
@mervynteo $.cloudinary.config({
cloud_name: Meteor.settings.public.cloudinary.cloud_name
}) Cloudinary.config is for server side only. |
So: been working on this for hours, gotta be something simple I'm missing but I'm not sure where the fault may lay. This issue only happens upon deploying to Heroku as it works fine locally. So, not sure if it's a buildpack issue or something with this package. For whatever reason heroku doesn't seem to recognize the package or the way Cloudinary is being defined. I'm using Meteor 1.4.0.1 as well. Any ideas?
/app/.meteor/heroku_build/app/programs/server/node_modules/fibers/future.js:280
throw(ex);
^
TypeError: Cannot read property 'Cloudinary' of undefined
at meteorInstall.imports.startup.server.cloudinary-config.js (imports/startup/server/cloudinary-config.js:5:15)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.imports.startup.server.index.js (imports/startup/server/index.js:1:1)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
at Module.require (packages/modules-runtime/.npm/package/node_modules/install/install.js:82:1)
at Module.Mp.import (/app/.meteor/heroku_build/app/programs/server/npm/node_modules/meteor/modules/node_modules/reify/lib/runtime.js:70:16)
at meteorInstall.server.main.js (server/main.js:1:8)
at fileEvaluate (packages/modules-runtime/.npm/package/node_modules/install/install.js:153:1)
Here is my server code:
import { Meteor } from 'meteor/meteor';
Cloudinary.config({
cloud_name: Meteor.settings.public.Cloudinary.CLOUD_NAME,
api_key: Meteor.settings.private.Cloudinary.API_KEY,
api_secret: Meteor.settings.private.Cloudinary.API_SECRET,
});
I also added
import { Cloudinary } from 'meteor/lepozepo:cloudinary';
just to see if a specific import would do anything but no joy
The text was updated successfully, but these errors were encountered: