I’m trying my first ember programing (normally I do stuff in vue.js) and finding the rules for import to be a bit challenging. My project is named add-managed-device. “ember --version” says: ember-cli: 4.9.2 node: 14.17.3 os: linux x64
I’ve got a file called add-managed-device/app/routes/test-add-device.js which has a dependency on add-managed-device/app/models/managed-device-info.js
I’ve tried import managed-device-info.js in all the ways that seemed somewhat rational, but when I run “ember server” and point a browser at it, the browser console gives me errors.
import ManagedDeviceInfo from ‘add-managed-device/models/managed-device-info.js’ ==>
Uncaught Error: Could not find module add-managed-device/models/managed-device-info.js
imported from add-managed-device/routes/test-add-device
import ManagedDeviceInfo from ‘add-managed-device/app/models/managed-device-info.js’ ==>
loader.js:247 Uncaught Error: Could not find module add-managed-device/app/models/managed-device-info.js
imported from add-managed-device/routes/test-add-device
import ManagedDeviceInfo from ‘…/models/managed-device-info.js’ ==>
loader.js:247 Uncaught Error: Could not find module add-managed-device/models/managed-device-info.js
imported from add-managed-device/routes/test-add-device
import ManagedDeviceInfo from ‘…/app/models/managed-device-info.js’ ==>
Uncaught Error: Could not find module add-managed-device/app/models/managed-device-info.js
imported from add-managed-device/routes/test-add-device
import ManagedDeviceInfo from ‘…/…/app/models/managed-device-info.js’ ==>
loader.js:247 Uncaught Error: Could not find module app/models/managed-device-info.js
imported from add-managed-device/routes/test-add-device
Can anybody suggest a cause/cure? Thank you.