Open dwickern opened 1 year ago
Are you using yarn or npm? Is it possible that the devDeps of ember-moment got installed, or some other dependency has brought in moment-timezone, and dependency hoisting my the package manager has caused an incorrect node_modules, making ember-moment think moment-timezone is there?
yarn why moment-timezone
npm ls moment-timezone
Other than that, a reproduction repo would be most helpful
I have the same issue. This is the error message I get in the browser console:
Uncaught Error: Could not find module
moment-timezone
imported fromember-moment/services/moment
at vendor-0d27e4b18fc275130628c0dc4d87016a.js:259:11 at c (vendor-0d27e4b18fc275130628c0dc4d87016a.js:270:7) at a.findDeps (vendor-0d27e4b18fc275130628c0dc4d87016a.js:180:24) at c (vendor-0d27e4b18fc275130628c0dc4d87016a.js:274:11) at a.findDeps (vendor-0d27e4b18fc275130628c0dc4d87016a.js:180:24) at c (vendor-0d27e4b18fc275130628c0dc4d87016a.js:274:11) at requireModule (vendor-0d27e4b18fc275130628c0dc4d87016a.js:36:15) at e.value (vendor-0d27e4b18fc275130628c0dc4d87016a.js:196071:24) at r._extractDefaultExport (vendor-0d27e4b18fc275130628c0dc4d87016a.js:196427:41) at r.resolveOther (vendor-0d27e4b18fc275130628c0dc4d87016a.js:196157:32)
In the package.json file, I have:
"ember-auto-import": "^2.6.0", "ember-cli-moment-shim": "^3.8.0", "ember-moment": "^9.0.1", "moment-duration-format": "^2.3.2",
According to yarn:
Found "moment-timezone@0.5.43" Reasons this module exists
- "ember-cli-moment-shim" depends on it
- Hoisted from "ember-cli-moment-shim#moment-timezone"
- Hoisted from "ember-moment#moment-timezone"
@mehran-naghizadeh there's a workaround in https://github.com/embroider-build/ember-auto-import/issues/578#issuecomment-1532096597
After upgrading ember-auto-import from 2.6.1 to 2.6.2, the app has a runtime failure importing moment-timezone:
The app does not have a dependency on moment-timezone.