Opened 9 years ago
Closed 9 years ago
#14548 closed bug (fixed)
npm jQuery does not have a main module
Reported by: | 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 [email protected] 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.
Change History (3)
comment:1 Changed 9 years ago by
Component: | unfiled → core |
---|---|
Milestone: | None → 1.11/2.1 |
Owner: | set to timmywil |
Priority: | undecided → blocker |
Status: | new → assigned |
comment:2 Changed 9 years ago by
For now, require('jquery/dist/jquery')
or require('jquery/src/someModule')
is a workaround.
comment:3 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Fixes #14548. Add main property to package.json
Changeset: 6fde9752599f035da5e328b54a1e23e075e4ad45
Note: See
TracTickets for help on using
tickets.
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.