willconant / flow-js

Javascript Library for Multi-step Asynchronous Logic
MIT License
302 stars 15 forks source link

Cannot load Flow.JS using Require.JS #13

Open paulcanning opened 9 years ago

paulcanning commented 9 years ago

I have Require.JS in my JS folder, along side Flow.JS.

I have added the script tag to load Require.JS, then in another script, called:

var flow = require('./flow');

As per the Readme, but it doesn't work.

I get:

Uncaught Error: Module name "flow" has not been loaded yet for context: _. Use require([]) http://requirejs.org/docs/errors.html#notloaded

require.js:8 Uncaught Error: Mismatched anonymous define() module: function (){return c} http://requirejs.org/docs/errors.html#mismatch

I then tried:

var flow = require(['./flow']);

But I got:

Uncaught Error: Mismatched anonymous define() module: function (){return c} http://requirejs.org/docs/errors.html#mismatch

Can I get some help on installing this? Ideally without Require.JS, as I am not using it (apart form to try and load this library!)