question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to initialize module using "browserify"

See original GitHub issue

I’m using Browserify to handle my module dependencies. I’ve been unable to get ng-flow working. All I get is this error whenever I try to use the “flow-init” wrapper attribute:

“ReferenceError: Flow is not defined”

This is how I’ve got it set up in my main app.js file:

require('ng-flow');
module.exports = angular.module('myApp', ['flow']);

Nothing I do seems to make a difference. I’ve tried loading the ng-flow-standalone.js file instead of ng-flow.js but it makes no difference.

I used bower to install this module.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:1
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ansariescommented, Aug 19, 2016

it did not worked for me with above options however i tried following which worked pretty good 👍

angular
        .module('app')
        .config(function (flowFactoryProvider) {
          flowFactoryProvider.factory = function (opts) {
            var Flow = require('ng-flow/dist/ng-flow-standalone.js'); 
            // orignal flow.js was probably not loading i dont know why.
            return new Flow(opts)
         }
       });

thanks jdiver for the tip 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't browserify use my module? - Stack Overflow
1 Answer 1 ... Browserify was mis-packing the file after transmogrifying it through Babel, so I simply used Webpack to package with which...
Read more >
Using Browserify to require modules in the browser, just like in ...
Browserify solves the module problem by letting you require modules exactly like you would in Node. In this article, we take a look...
Read more >
Untangle Your JavaScript with Browserify | Lincoln Loop
Browserify encapsulates every module in it's own scope, so strict mode will only apply to the current module. To use the Underscore library, ......
Read more >
Browserify Tutorial - Using require() In The Browser - YouTube
Learn how to use the require() function to import Javascript modules in the front-end part of your web application (in the browser) with...
Read more >
npm, Browserify & Modules - Ampersand.js - Learn
Installing Dependencies · Create a node_modules directory in your project (if one isn't there) and install ampersand-state into it, along with it's dependencies....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found