loader is failing to load an ES6 module
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
- 领域
- tooling
调研方向
从 loader.js 开始,重点查看 missingModule 函数以及报告中提到的注册表。重现 moment-range 的导入错误,并确定对 ES6 模块的预期处理方式;如果已确认报告中的导入行为得到解决,并且 repository 提供了适当的回归检查,则视为完成。
由索引模型根据 Issue 内容生成。
描述
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?
- 主要语言
- JavaScript
- 星标
- 79
- 派生
- 69
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ember-cli/loader.js 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 25/100
-
难度 5/5 一周以上 新手友好度 25/100
-
难度 2/5 1-3 小时 新手友好度 25/100
查看 ember-cli/loader.js 的全部 Issue
相似的 Issue
-
难度 1/5 1-3 小时 新手友好度 78/100
Mintplex-Labs/anything-llm#6490 ·
-
难度 2/5 1-3 小时 新手友好度 86/100
-
[quality] workflow-scripts guard reads test:unit:coverage as skipping the unit suite, blocking #632 未关闭agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
难度 2/5 1-3 小时 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
area-clientside-dartpad
难度 2/5 1-3 小时 新手友好度 62/100