Bug Tracker

Opened 9 years ago

Closed 9 years ago

#14548 closed bug (fixed)

npm jQuery does not have a main module

Reported by: [email protected] Owned by: timmywil
Priority: blocker Milestone: 1.11/2.1
Component: core Version: 2.1.0-beta1
Keywords: Cc:
Blocked by: Blocking:


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 timmywil

Component: unfiledcore
Milestone: None1.11/2.1
Owner: set to timmywil
Priority: undecidedblocker
Status: newassigned

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.

comment:2 Changed 9 years ago by timmywil

For now, require('jquery/dist/jquery') or require('jquery/src/someModule') is a workaround.

comment:3 Changed 9 years ago by Timmy Willison

Resolution: fixed
Status: assignedclosed

Fixes #14548. Add main property to package.json

Changeset: 6fde9752599f035da5e328b54a1e23e075e4ad45

Note: See TracTickets for help on using tickets.