jakubrohleder / angular-jsonapi

Simple and lightweight, yet powerful ORM for your frontend that seamlessly integrates with your JsonAPI server.
http://jakubrohleder.github.io/angular-jsonapi/
GNU General Public License v3.0
94 stars 34 forks source link

Uncaught ReferenceError: Parse is not defined #35

Closed pablorsk closed 8 years ago

pablorsk commented 8 years ago

When I install the library in my project, console says:

Uncaught ReferenceError: Parse is not defined

I follow these steps:

bower install angular-jsonapi --save

and I add this modules to my project

        'angular-jsonapi',
        'angular-jsonapi-rest',
        'angular-jsonapi-local',
        'angular-jsonapi-parse',

Any ideas? Thanks....

mustela commented 8 years ago

The lib can use parse.com so if you don't need it, just remove the angular-jsonapi-parse module.

Hope it helps!

pablorsk commented 8 years ago

Thanks @mustela, I try removing 'angular-jsonapi-parse' but the problem persist.

Uncaught ReferenceError: Parse is not defined

The error is in angular-jsonapi.js line 267:

(function() {
  'use strict';

  /* global Parse: false */
  angular.module('angular-jsonapi-parse', ['angular-jsonapi'])
    .constant('Parse', Parse);
})();

Thanks again....

mustela commented 8 years ago

Hey @pablorsk are you still having issues?

pablorsk commented 8 years ago

Yeap :'(. I'm trying with https://github.com/goodbomb/angular-gulp-browserify-starter/, maybe angular-json is not ready for browserify.

pablorsk commented 8 years ago

I'm trying, now, with https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate, maybe angular-json is not ready for browserify.

someone used angular-jsonapi with browserify?

marsohod commented 8 years ago

+1

yves-s commented 8 years ago

Hey @pablorsk, you have to install and include the dependencies/modules parse, pluralize and validate: Install dependencies

bower install --save parse pluralize vaildate

Include sources

<script src="lib/parse/parse.js" charset="utf-8"></script>
<script src="lib/pluralize/pluralize.js" charset="utf-8"></script>
<script src="lib/validate/validate.js" charset="utf-8"></script>
<script src="lib/angular-jsonapi/dist/angular-jsonapi.js"></script>

UPDATE: You also have to install and include

bower install --save angular-uuid4
<script src="lib/angular-uuid4/angular-uuid4.js"></script>
karneaud commented 8 years ago

@pablorsk did this work for you? I am using the same browserify boilerplate. Can't seem to get it to work

pablorsk commented 8 years ago

No, we never can use angular-jsonapi with https://github.com/goodbomb/angular-gulp-browserify-starter/ or https://github.com/jakemmarsh/angularjs-gulp-browserify-boilerplate.

But now, we use this generator: https://github.com/Swiip/generator-gulp-angular, and WORK REALLY GREAT!