Search code examples
ember.jsember-dataember-cli

Ember production build, could not find module . due to module name contains '\' instead of '/'


In production ember build, i got the below error while loading index.html.

Uncaught Error: Could not find module ember-data/-private\system\references\record imported from ember-data/-private/system/references

I believe module name forward slash causes this issue.

I don't have any entry in ember-cli-build.js file. While analyzing this error, I found registry contains the below Modules,
"ember-data/-private/system/references"
"ember-data/-private/system/references/belongs-to"
"ember-data/-private/system/references/has-many"

but some how it is checking for the below dependencies in registry ember-data-private\system\references
ember-data-private\system\references\belongs-to
ember-data-private\system\references\has-many

that causes the below missing module error. Any one help me how to solve this error.


Solution

  • The bug has fixed.

    As a best practice, actively use ~ (tilde) or ^ (caret) on your package.json. So you can get the latest release when you run npm install.