Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not find module `ember-data/-private #5021

Closed
moogus opened this issue Jun 19, 2017 · 15 comments
Closed

Could not find module `ember-data/-private #5021

moogus opened this issue Jun 19, 2017 · 15 comments

Comments

@moogus
Copy link

moogus commented Jun 19, 2017

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?

@royk
Copy link

royk commented Jun 19, 2017

Same here. Going back to 2.13.2 fixes it. (2.14.0 is already broken)

@os6sense
Copy link

Same issue

@runspired
Copy link
Contributor

This appears to be an issue with ember-cli-babel < 6

@alcance
Copy link

alcance commented Jun 19, 2017

Same issue.

"ember-cli": "2.9.1",
"ember-data": "^2.7.0",
"ember-cli-babel": "^5.1.6"

@marclundgren
Copy link

marclundgren commented Jun 19, 2017

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)

@alcance
Copy link

alcance commented Jun 19, 2017

Targeting ember-data's version to ~2.13.0 fixed it for me

@bmac
Copy link
Member

bmac commented Jun 19, 2017

Ember Data v2.14.2 is published with a fix for this issue.

@BrianSipple
Copy link

BrianSipple commented Jun 22, 2017

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"

@rwjblue
Copy link
Member

rwjblue commented Jun 22, 2017

@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 ember-data@2.14.0. import link

@stefanpenner
Copy link
Member

stefanpenner commented Jun 22, 2017

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:)

@abbasovalex
Copy link

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.

@balinterdi
Copy link
Contributor

That's fixed in 0.0.8 of ember-resource-metadata (see PR here).

@royk
Copy link

royk commented Sep 6, 2017

This is now back in Ember data 2.15.0

@tomasbecklin
Copy link

Ended up locking ember data to 2.14.10

@dave-ramirez
Copy link

Increasing Ember-data dependency solved my problem.

npm install --save ember-data@2.14.2 and npm cache clean

by: Pavol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests