Skip to content

alasql is not defined with requireJS, can anyone please let me know what is the Exact issue. #417

Closed

Description

@hsHemant

I am using this code:

define(
[ 'angular',
'controllers-module',
'../../../../../bower_components/alasql/dist/alasql.js'],
function(angular,
controllers,
alasql
) {

Activity

  1. hsHemant commented on Sep 16, 2015

    @hsHemant
    Author

    further if I trigger alasql function that error comes.

    TypeError: Cannot read property 'write' of undefined.
    I am using AngularJS with RequireJS. I think RequireJS here unable to load the dependency.

  2. antony-k1208 commented on Sep 16, 2015

    @antony-k1208

    please see:

    https://github.com/agershun/alasql/wiki/Angular.js

    "You can use AlaSQL together with Angular.js framework. Please include the file normally and not via requireJS"

  3. hsHemant commented on Sep 16, 2015

    @hsHemant
    Author

    Thanks ThinklabsGbR, Its working for me.

    But, one suggestion for the guys who will gonna use it in the same scenario.
    Please include alasql before requireJS. Like This:

    script src="../../bower_components/alasql/dist/alasql.js"></script
    script src="../../bower_components/js-xlsx/dist/xlsx.core.min.js"></script

    script src="../../bower_components/requirejs/require.js"></script

    Otherwise, that will cause a issue of "Mismatched anonymous define() module". This issue is with requireJS.

    ThinklabsGbR, I hop soon we will see this awesome JS library with requireJS compatibility.

  4. mathiasrw commented on Sep 16, 2015

    @mathiasrw
    Member

    @ThinklabsGbR thanks for a quick answer...

    Ill update the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions