Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

loader is failing to load an ES6 module

Open
#119 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
javascript
Domain
tooling

Research direction

Start with loader.js, especially the missingModule function and the registry mentioned in the report. Reproduce the moment-range import errors and determine the expected handling for an ES6 module; done should be a confirmed resolution for the reported import behavior, with an appropriate regression check if the repository provides one.

Written by the indexing model from the issue text.

Description

In my project we're using moment-range, which got an update in it's version 3 to be an ES6 module.

Previously we'd been loading it using ember-browserify and thus were doing import DateRange from 'npm:moment-range'. This doesn't work with the updated version, as one will get the error TypeError: _npmMomentRange.default is not a constructor, presumably as there's no default export on the module. Besides, as it's an ES6 module from what I understand the npm: prefix shouldn't be necessary.

Omitting the npm: prefix however gives a different error:
Error: Could not find module 'moment-range' imported from 'foo/bar/baz'
which is thrown by the missingModule function in loader.js. Poking about a bit, there's no sign of moment-range in the registry inside loader.js.

I may well be doing something wrong, but I'm at a loss to see what I should be doing differently.

Any suggestions?

Dominant language
JavaScript
Stars
79
Forks
69
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ember-cli/loader.js

All issues in ember-cli/loader.js

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.