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 imported from ember-data/setup-container #5019

Closed
allthesignals opened this issue Jun 18, 2017 · 10 comments

Comments

@allthesignals
Copy link
Contributor

allthesignals commented Jun 18, 2017

I'm currently unable to get my project to build (again). I tried to yarn add a dependency - I don't know what it did, but it did something. I don't see any changes to package.json or bower.json in my working copy (it added a yarn.lock but I reverted everything for sanity). Here are those files:

{
  "name": "cityxcity",
  "version": "0.0.0",
  "description": "Small description for cityxcity goes here",
  "private": true,
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test",
    "deploy": "ember github-pages:commit --message \"Deploy gh-pages from commit $(git rev-parse HEAD)\" --environment=production; git push origin gh-pages:gh-pages -f; git checkout develop"
  },
  "repository": "",
  "engines": {
    "node": ">= 0.12.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.5",
    "ember-ajax": "^2.4.1",
    "ember-array-contains-helper": "1.3.1",
    "ember-async-image": "0.1.1",
    "ember-browserify": "^1.1.13",
    "ember-c3": "0.3.1",
    "ember-c3-shim": "0.0.6",
    "ember-cli": "2.9.1",
    "ember-cli-app-version": "^2.0.0",
    "ember-cli-autoprefixer": "0.6.0",
    "ember-cli-babel": "^5.1.7",
    "ember-cli-data-export": "0.1.28",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-deploy": "0.5.1",
    "ember-cli-eslint": "3.0.0",
    "ember-cli-form-data": "1.0.0",
    "ember-cli-github-pages": "0.1.2",
    "ember-cli-htmlbars": "^1.0.10",
    "ember-cli-htmlbars-inline-precompile": "^0.3.3",
    "ember-cli-inject-live-reload": "^1.4.1",
    "ember-cli-mirage": "0.2.4",
    "ember-cli-mocha": "0.11.0",
    "ember-cli-moment-shim": "3.0.1",
    "ember-cli-nouislider": "0.11.0",
    "ember-cli-release": "^0.2.9",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-string-helpers": "1.3.0",
    "ember-cli-test-loader": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-composable-helpers": "1.1.2",
    "ember-d3": "0.3.2",
    "ember-data": "^2.11.0",
    "ember-export-application-global": "^1.0.5",
    "ember-form-for": "2.0.0-alpha.4",
    "ember-leaflet": "3.0.9",
    "ember-leaflet-cartodb": "git://github.com/allthesignals/ember-leaflet-cartodb.git",
    "ember-leaflet-marker-cluster": "0.0.5",
    "ember-load-initializers": "^0.5.1",
    "ember-mocha": "0.9.3",
    "ember-modal-dialog": "0.9.0",
    "ember-moment": "7.3.0",
    "ember-pagefront": "0.11.2",
    "ember-pikaday": "2.2.1",
    "ember-power-select": "1.5.0-beta.2",
    "ember-resolver": "^2.0.3",
    "ember-route-action-helper": "2.0.2",
    "ember-searchable-select": "0.10.0",
    "ember-simple-auth": "1.2.0-beta.1",
    "ember-string-helpers": "1.0.2",
    "ember-template-lint": "^0.6.3",
    "ember-tether": "0.4.1",
    "ember-truth-helpers": "1.3.0",
    "ember-uploader": "1.2.3",
    "ember-welcome-page": "^1.0.3",
    "ember-wormhole": "0.5.1",
    "eslint-plugin-ember-suave": "^1.0.0",
    "liquid-fire": "0.27.0",
    "liquid-tether": "2.0.3",
    "loader.js": "^4.0.10",
    "semantic-ui-ember": "2.0.0",
    "squel": "^5.5.0"
  },
  "dependencies": {
    "ember-cli-sass": "^6.0.0",
    "geojson2svg": "^1.0.6",
    "string-humanize": "^1.0.0"
  }
}
{
  "name": "cityxcity",
  "dependencies": {
    "ember": "~2.9.0",
    "ember-cli-shims": "~0.1.1",
    "ember-mocha-adapter": "~0.3.1",
    "semantic-ui": "^2.2.6",
    "leaflet": "1.0.2",
    "nouislider": "^8.0.1",
    "leaflet.markercluster": "^1.0.0",
    "d3": "3.5.17",
    "c3": "^0.4.11",
    "file-saver": "^1.3.3",
    "js-xlsx": "~0.8.0"
  },
  "devDependencies": {
    "squel": "^5.5.0"
  },
  "resolutions": {
    "leaflet": ">= 1.0.0"
  }
}

I can't clone and stand my project up anymore either. Either something happened between the first time I installed a package (as it was in my local node_modules) and when I re-installed that package, or something is happening locally that I can't understand.

Reverting back to to previous working commits on my project doesn't seem to help.

Here are some probably-relevant NPM warns:

npm WARN ember-data@2.14.0 requires a peer of ember-inflector@^2.0.0 but none was installed.
npm WARN broccoli-typescript-compiler@0.6.2 requires a peer of typescript@^1.6.2 || ^1.7.0 || ^1.8.0 || ^1.9.0-dev || ^2.0.0 || ^2.0.0-dev || ^2.1.0-dev || next but none was installed.
npm WARN broccoli-tslinter@2.0.1 requires a peer of typescript@^2.0.0 but none was installed.
npm WARN broccoli-tslinter@2.0.1 requires a peer of tslint@^4.0.2 but none was installed.

I will try to upgrade my version of ember-data, but I am conservative about changing versions because of the number of dependencies I have. I wasn't able to find this particular issue elsewehre, so sorry if it already exists - I think there may be a bug.

@allthesignals
Copy link
Contributor Author

"ember-data": "^2.11.0", allowed minor version drift which was actually installing 2.14.0 (hence the warning). I locked the version by removing ^, thanks @runspired for the help.

@tomwayson
Copy link

we also had "ember-data": "^2.11.0" and we started seeing lots of failing tests in CI w/ 'Could not find module ...', or 'setupContainer is not a function'.

I noticed that 2.14.0 was causing UNMET PEER DEPENDENCY ember-inflector@1.12.1, so I changed or package.json to "ember-data": "~2.11.0" and tests passed.

After reading #5021, I then tried "ember-data": "~2.13.0" (which also has a peer dep on ember-inflector 2.0) and tests passed w/ that.

So it seems that the issue is w/ ember-data 2.14.0 and not related to the unmet peer dependency.

@alcance
Copy link

alcance commented Jun 19, 2017

Same issue here. I using "ember-data": "^2.7.0",

@bmac
Copy link
Member

bmac commented Jun 19, 2017

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

@urbany
Copy link

urbany commented Jun 20, 2017

@bmac sorry if this is a silly question, but does ember-inflector need to be listed as a peer dependency if it is already listed as a dependency?
https://github.com/emberjs/data/blob/v2.14.2/package.json#L40
https://github.com/emberjs/data/blob/v2.14.2/package.json#L111

irees added a commit to transitland/dispatcher that referenced this issue Jun 28, 2017
runspired added a commit to runspired/data that referenced this issue Aug 8, 2017
stefanpenner pushed a commit to runspired/data that referenced this issue Aug 23, 2017
stefanpenner pushed a commit to runspired/data that referenced this issue Aug 23, 2017
Xarthisius added a commit to whole-tale/dashboard that referenced this issue Sep 1, 2017
@valanto
Copy link

valanto commented Sep 7, 2017

Having the same error on our console. We haven't execute a build for a couple of weeks now and now the error appears. We are a bit behind with the ember versions. Desperate for a solution:

"broccoli-asset-rev": "^2.4.2",

"ember-ajax": "0.7.1",

"ember-block-slots": "1.1.6",

"ember-cli": "2.5.0",

"ember-cli-app-version": "^1.0.0",

"ember-cli-babel": "^5.1.6",

"ember-cli-bootstrap-sassy": "0.5.3",

"ember-cli-content-for-config": "1.0.1",

"ember-cli-dependency-checker": "^1.2.0",

"ember-cli-htmlbars": "^1.0.3",

"ember-cli-htmlbars-inline-precompile": "^0.3.1",

"ember-cli-inject-live-reload": "^1.4.0",

"ember-cli-jshint": "^1.0.0",

"ember-cli-poll": "0.1.0",

"ember-cli-qunit": "^1.4.0",

"ember-cli-release": "0.2.8",

"ember-cli-sass": "5.3.1",

"ember-cli-sass-pods": "1.3.0",

"ember-cli-sri": "^2.1.0",

"ember-cli-uglify": "^1.2.0",

"ember-data": "^2.5.0",

"ember-export-application-global": "^1.0.5",

"ember-font-awesome": "2.2.0",

"ember-load-initializers": "^0.5.1",

"ember-prop-types": "2.5.11",

"ember-resolver": "^2.0.3",

"ember-simple-auth": "1.1.0",

"loader.js": "^4.0.1"

@mervinva
Copy link

mervinva commented Sep 8, 2017

@valanto use "ember-data":"2.14.10" until the bug fix will be released.

@zidjian257
Copy link

Seeing same issue on ember-data Release v2.15.0.

@weimingrui
Copy link

I think that the version of ember-data add-on is causing this problem.I fix by updating the version.My old version is 2.14.1,update to 2.5.0

runspired added a commit to runspired/data that referenced this issue Sep 14, 2017
runspired added a commit to runspired/data that referenced this issue Sep 14, 2017
runspired added a commit to runspired/data that referenced this issue Sep 14, 2017
runspired added a commit to runspired/data that referenced this issue Sep 14, 2017
@locks locks closed this as completed in f3bfad8 Sep 15, 2017
locks added a commit that referenced this issue Sep 15, 2017
Make import stripping smarter to resolve #5019
morhook added a commit to morhook/canvas-editor that referenced this issue Sep 18, 2017
The ember-data should be 2.11.0 (using 2.14.0 breaks build).

Added package-lock.json, just because I'm using NPM 5 too to avoid
problems like this in the future.

Problem on my machine without this fix:
emberjs/data#5019
@BJKPriyanka
Copy link

I am having the same error in heroku app. My local is working fine.

ember-data version = 2.13.0

amkirwan pushed a commit to amkirwan/ember-oauth2 that referenced this issue Sep 30, 2017
bmac pushed a commit that referenced this issue Oct 4, 2017
(cherry picked from commit f3bfad8)
catpham pushed a commit to intercom/ember-oauth2 that referenced this issue Mar 2, 2018
catpham pushed a commit to intercom/ember-oauth2 that referenced this issue Mar 5, 2018
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

10 participants