I'm having a similar to Could not find module ember-data/-private imported from ember-data/setup-container #5019
CLI builds stating:
'instrument' is imported from external module 'ember-data/-debug' but never used
[BABEL] Note: The code generator has deoptimised the styling of "-private.js" as it exceeds the max of "100KB".
When I run my tests I get:
Error: Could not find module `ember-data/-private` imported from `ember-data/setup-container`
at missingModule (https://localhost:4200/assets/vendor.js:228:11)
at findModule (https://localhost:4200/assets/vendor.js:239:17)
at Module.findDeps (https://localhost:4200/assets/vendor.js:179:24)
at findModule (https://localhost:4200/assets/vendor.js:242:11)
at Module.findDeps (https://localhost:4200/assets/vendor.js:179:24)
at findModule (https://localhost:4200/assets/vendor.js:242:11)
at requireModule (https://localhost:4200/assets/vendor.js:29:15)
at https://localhost:4200/assets/vendor.js:240732:20
at Array.forEach (native)
at exports.default (https://localhost:4200/assets/vendor.js:240729:8)
Tried latest ember-data, and my current 2.10 both with and without ^. Just seems super broken.
Any ideas?
Same here. Going back to 2.13.2 fixes it. (2.14.0 is already broken)
Same issue
This appears to be an issue with ember-cli-babel < 6
Same issue.
"ember-cli": "2.9.1",
"ember-data": "^2.7.0",
"ember-cli-babel": "^5.1.6"
Can confirm.
"ember-cli": "2.6.3",
"ember-data": "^2.6.0",
"ember-cli-babel": "^5.1.6",
upgrading to ember-cli-babel: 6.0.0 results in the same symptom. ember-cli-babel: 6.4.1 introduces a new error when starting the ember server:
โ ด Building'instrument' is imported from external module 'ember-data/-debug' but never used
โ Building[BABEL] Note: The code generator has deoptimised the styling of "-private.js" as it exceeds the max of "100KB".
Build failed.
File: revv/adapters/application.js
The Broccoli Plugin: [broccoli-persistent-filter:Babel > [Babel: revv]: Babel: revv] failed with:
TypeError: babel.Transformer is not a constructor
at htmlbarsInlineCompilerPlugin (/Users/marc/Dev/github/clones/revv/node_modules/babel-plugin-htmlbars-inline-precompile/index.js:22:12)
Targeting ember-data's version to ~2.13.0 fixed it for me
Ember Data v2.14.2 is published with a fix for this issue.
I just updated to v2.14.2 and I'm still getting something very similar.
This is what gets logged in my shell when I run ember serve:
'instrument' is imported from external module 'ember-data/-debug' but never used
'instrument' is imported from external module 'ember-data/-debug' but never used
And this is error thrown in the browser console when I visit the app running on my localhost:
loader.js:244 Uncaught Error: Could not find module `ember-data/-private/system/normalize-model-name` imported from `ember-resource-metadata/private-api`
at missingModule (loader.js:244)
at findModule (loader.js:255)
at Module.findDeps (loader.js:165)
at findModule (loader.js:259)
at Module.findDeps (loader.js:165)
at findModule (loader.js:259)
at Module.findDeps (loader.js:165)
at findModule (loader.js:259)
at Module.findDeps (loader.js:165)
at findModule (loader.js:259)
FWIW, @royk's suggestion of pinning to 2.13.2 cleared this up for me.
Also, some other version info...
"ember-cli": "^2.13.2",
"ember-cli-babel": "^6.4.1",
"ember-source": "^2.13.3"
@BrianSipple - That seems like a thing that ember-resource-metadata needs to deal with (not the issue being reported here). Specifically, that addon is importing a module that will not exist in [email protected]. import link
If I'm understanding correctly, an addon is importing private api, which has now been moved. Although I can totally empathize, that add-on will need to update itself.
If i have misunderstood, let me know. I can gladly reopen:)
Same problem:
$ ember -v
ember-cli: 2.15.0-beta.1
node: 8.0.0
os: darwin x64
Anybody could fix it? All my projects were broken :( I tried install several version of ember-cli, but could not fixed it.
That's fixed in 0.0.8 of ember-resource-metadata (see PR here).
This is now back in Ember data 2.15.0
Ended up locking ember data to 2.14.10
Increasing Ember-data dependency solved my problem.
npm install --save [email protected] and npm cache clean
by: Pavol
Most helpful comment
Same here. Going back to 2.13.2 fixes it. (2.14.0 is already broken)