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

Error: AMD define not called #76

Open
CNSKnight opened this issue Jun 12, 2015 · 3 comments
Open

Error: AMD define not called #76

CNSKnight opened this issue Jun 12, 2015 · 3 comments

Comments

@CNSKnight
Copy link

The following pattern results in the titled thrown error:

example.js:

(function (root, factory) {
        if (typeof define === 'function' && define.amd) {
            // AMD. Register as an anonymous module.
            define(factory);
        } else {
            // Browser globals
            root.form2js = factory();
        }
}(this, (function(namespace) {
        return function () {
            ...
            return something;
        };
})(myNamespace)));
@unscriptable
Copy link
Contributor

That looks like it should be correctly sniffed by rave's autodetect mechanism. Is there a module: [] property in the bower.json or package.json for the package where that module resides? If so, what is it?

You can override the bower.json or package.json setting.

@CNSKnight
Copy link
Author

example.js above is not a package and has not (in this case) a bower.json

@unscriptable
Copy link
Contributor

Hey @CNSKnight, rave requires a top-level bower.json and/or package.json and requires that you use bower or npm to install all third-party packages. Have you looked at Developing apps with rave?

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