Side navigation
#14548 closed bug (fixed)
Opened November 15, 2013 04:50PM UTC
Closed November 15, 2013 10:07PM UTC
npm jQuery does not have a main module
Reported by: | domenic@domenicdenicola.com | Owned by: | timmywil |
---|---|---|---|
Priority: | blocker | Milestone: | 1.11/2.1 |
Component: | core | Version: | 2.1.0-beta1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Because jquery's package.json does not have a "main" field, it's not possible to require jQuery.
Steps to reproduce:
npm install jquery@2.1.0-beta2
echo "var $ = require('jquery');" > test.js
node test.js
Throws error: cannot find module 'jquery'.
I'd suggest exposing dist/jquery.js as the main module.
Attachments (0)
Change History (3)
Changed November 15, 2013 05:41PM UTC by comment:1
component: | unfiled → core |
---|---|
milestone: | None → 1.11/2.1 |
owner: | → timmywil |
priority: | undecided → blocker |
status: | new → assigned |
Changed November 15, 2013 05:42PM UTC by comment:2
For now, require('jquery/dist/jquery')
or require('jquery/src/someModule')
is a workaround.
I absolutely agree we need a main property. I seem to recall that we had this property at one point and it was removed, but that could be totally wrong.