8000 Mystifying gobble error on browserify · Issue #87 · gobblejs/gobble · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Mystifying gobble error on browserify #87

Open

Description

@martypdx

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.

Activity

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

      0