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

Mystifying gobble error on browserify #87

Open
martypdx opened this issue Jul 28, 2015 · 0 comments
Open

Mystifying gobble error on browserify #87

martypdx opened this issue Jul 28, 2015 · 0 comments

Comments

@martypdx
Copy link

We replicated our working gobble build to a new project and hit a roadblock.

Essentially, there are js files getting merged and then browserified via:

var bundle = gobble( [ components, js, vendor ] )
    .transform( 'browserify', {
        entries: './index.js',
        configure: function ( bundle ) {
            excludeModules.forEach( function( module ) {
                bundle.exclude( module );
            });
        },
        dest: 'bundle.js',
        debug: gobble.env() !== 'production'
    });

I can see in the .gobble dir that the merge happens successfully, but then it fails in the browserify step with:

∙∙∙∙∙∙∙ 18-browserify running...                                                                                                        
gobble: 18-browserify transformation failed

input:  /Users/marty/ractive-starter-project/.gobble/17-merge/1
output: /Users/marty/ractive-starter-project/.gobble/18-browserify/1
>>>
Cannot find module './app' from '/Users/marty/ractive-starter-project/.gobble/05-babel/.cache'
Error: Cannot find module './app' from '/Users/marty/ractive-starter-project/.gobble/05-babel/.cache'
    at /Users/marty/ractive-starter-project/node_modules/gobble-browserify/node_modules/browserify/node_modules/resolve/lib/async.js:55:21
    at load (/Users/marty/ractive-starter-project/node_modules/gobble-browserify/node_modules/browserify/node_modules/resolve/lib/async.js:69:43)
    at onex (/Users/marty/ractive-starter-project/node_modules/gobble-browserify/node_modules/browserify/node_modules/resolve/lib/async.js:92:31)
    at /Users/marty/ractive-starter-project/node_modules/gobble-browserify/node_modules/browserify/node_modules/resolve/lib/async.js:22:47
    at FSReqWrap.oncomplete (fs.js:95:15)
<<<

which is odd because it is looking in .gobble/05-babel/.cache folder which that is the pre-merge location of index.js, not the one in 17-merge/1. So it finds dependencies prior to the merge, but not those after the merge.

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

1 participant