1
votes

I am new to Ember.js and am working on an app with ember-cli-simple-auth-devise. It's working just fine in production, but when I deploy to production I get the following errors in console:

Uncaught TypeError: undefined is not a function vendor-dcea5bee9241c862bf2e30c2d2760f2e.js:15

Uncaught Error: Could not find module simple-auth-devise/initializer

This is a gist of my conf/environment.js [https://gist.github.com/gordonbisnor/b65f192392029fe703a1]

Not sure what other code might be relevant to include for reference, but would be happy to create gists, etc.

Wondering if anybody has an idea what could cause this to be working in development but not production.

1
This is not a configuration issue but must have to do sth. with your infrastructure. I assume you're using Ember CLI? You probably installed the Ember CLI Addon? Did you run the generator? - marcoow
Yes, using ember-cli and ember-cli-simple-auth-devise. I started developing locally, had no environment specific information, everything worked. I tried to setup different API locations for dev vs production (localhost:3000 vs production API) and deploy production - this is when I started seeing the error. I then tried reverting to just the default development environment and deploying that -- worked fine. So there's either something about how I am attempting to distinguish/deploy the production settings, or something that is beyond me in the workings of Bower/npm/ember-cli etc. I'm guessing? - Gordon Isnor
As long as Ember Simple Auth is registered in your bower.json file, it should be available regardless of whether it's running in the development or production environment. - marcoow
In Firefox I see a different error message: Ember.Handlebars.compile is not a function; then the same simple-auth-devise message: Uncaught Error: Could not find module simple-auth-devise/initializer. - Gordon Isnor
I tried using another randomly named environment, so "development", and "foobar" instead of "production" -- and had no problems. So either there's something wrong with my app (error that shows up in concatenation? some config that I have omitted?), that only shows up when ember-cli does the production build. - Gordon Isnor

1 Answers