bcoe / bcoe/npm-typeahead

$ is not defined when using jQuery via Browserify

Open
#10 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4
Forks
6
PR merge metrics
No merged PRs in 30d

Description

@bcoe I'm trying use npm-typeahead with a browserify-required version of jQuery, but I think there's a problem with the load order.

I made a little debugging sample at https://github.com/zeke/npm-typeahead-example#readme

The real context is https://github.com/npm/newww/blob/makeover/assets/js/index.js

If this is hard to solve, we can just continue to bundle it as a standalone file.

cc @rockbot

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the `$ is not defined` failure using the debugging sample linked in the issue, then compare its setup with newww's assets/js/index.js. Trace the jQuery and npm-typeahead load order and verify that the browserified integration loads without the error; the standalone bundle is identified as the fallback.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.