ember-animation / liquid-fire

Animations & transitions for ambitious Ember applications.
Other
1.15k stars 199 forks source link

[index.js] property treeForAddonTemplates does not exist #521

Open iamsebastian opened 7 years ago

iamsebastian commented 7 years ago

Hi guys,

I've just installed liquid-fire today via ember-cli. Ember does not build anymore.

I just debugged through the liquid-fire/index.js and found, that

var tree = this._super.treeForAddonTemplates.apply(this, arguments);

tries to call a non existent _super.fn. It was implemented here:

https://github.com/ember-animation/liquid-fire/blob/9184521b7d48d6372526d492e4fec512606f42a9/index.js#L28

Then I've checked, when the hook got implemented into ember-cli. And it's just far, far away: https://github.com/ember-cli/ember-cli/pull/4159

For the moment, I've just changed the line (see some lines below), so my project will build. Anybody knows, what's going wrong here? I couldn't find, why the Addon Object does not contain the requested method.

And why is index.js using the this._super.fn call, and not taking the tree from args? Means

why not this:

treeForAddonTemplates: function(tree) {
  return this._versionSpecificTree('templates', tree);
},

instead of this:

treeForAddonTemplates: function() {
  var tree = this._super.treeForAddonTemplates.apply(this, arguments);
  return this._versionSpecificTree('templates', tree);
},

logs

Error on build:

❯ ember s
version: 1.13.12
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
bootstrap-sassy config:  all JS enabled, glyphicons enabled
Cannot read property 'apply' of undefined
TypeError: Cannot read property 'apply' of undefined
    at Class.module.exports.treeForAddonTemplates (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/liquid-fire/index.js:28:49)
    at Class._treeFor (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:319:31)
    at Class.Addon.compileTemplates (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:483:31)
    at Class.Addon.compileAddon (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:523:28)
    at Class.Addon.treeForAddon (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:385:24)
    at Class.module.exports.treeForAddon (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/liquid-fire/index.js:23:41)
    at Class._treeFor (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:319:31)
    at Class.treeFor (/home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/models/addon.js:289:19)
    at /home/sblei/Projects/bp/macsi-ember-frontend/node_modules/ember-cli/lib/broccoli/ember-app.js:369:20
    at Array.map (native)

this._super object:

Addon {
  hintingEnabled: [Function],
  _requireBuildPackages: [Function],
  concatFiles: [Function],
  isDevelopingAddon: [Function],
  discoverAddons: [Function],
  initializeAddons: [Function],
  eachAddonInvoke: [Function: eachAddonInvoke],
  treeGenerator: [Function],
  treeFor: [Function: treeFor],
  _treeFor: [Function: _treeFor],
  included: [Function],
  treeForPublic: [Function],
  treeForAddon: [Function],
  treeForStyles: [Function],
  compileStyles: [Function],
  shouldCompileTemplates: [Function],
  compileTemplates: [Function],
  compileAddon: [Function],
  jshintAddonTree: [Function],
  addonJsFiles: [Function],
  preprocessJs: [Function],
  processedAddonJsFiles: [Function],
  moduleName: [Function],
  blueprintsPath: [Function],
  config: [Function],
  dependencies: [Function],
  isEnabled: [Function] }

my package.json

❯ ccat package.json
{
  "name": "macsi-ember-frontend",
  "version": "0.0.0",
...
  "devDependencies": {
    "broccoli-asset-rev": "^2.2.0",
    "ember-ajax": "2.5.1",
    "ember-bootstrap": "0.11.1",
    "ember-browserify": "^1.1.4",
    "ember-cli": "1.13.12",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-babel": "^5.1.5",
    "ember-cli-bootstrap-sassy": "0.0.18",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-dependency-checker": "^1.1.0",
    "ember-cli-htmlbars": "^1.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-ic-ajax": "0.2.4",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-qunit": "^1.0.4",
    "ember-cli-release": "0.2.8",
    "ember-cli-sass": "5.1.0",
    "ember-cli-sri": "^1.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "1.13.15",
    "ember-disable-proxy-controllers": "^1.0.1",
    "ember-export-application-global": "^1.0.4",
    "ember-feature-flags": "2.0.0",
    "ember-plupload": "1.13.16",
    "ember-simple-auth": "1.1.0",
    "ember-simple-auth-token": "1.1.1",
    "ember-truth-helpers": "1.2.0",
    "ember-unauthorized": "0.2.1",
    "liquid-fire": "0.26.4",
    "lodash": "3.10.1"
  }
}

my bower.json

❯ cat bower.json
{
  "name": "macsi-ember-frontend",
  "dependencies": {
    "ember": "1.13.10",
    "ember-cli-shims": "0.0.6",
    "ember-cli-test-loader": "0.2.1",
    "ember-data": "1.13.15",
    "ember-load-initializers": "0.1.7",
    "ember-qunit": "0.4.16",
    "ember-qunit-notifications": "0.1.0",
    "ember-resolver": "~0.1.20",
    "jquery": "1.11.3",
    "loader.js": "ember-cli/loader.js#3.2.1",
    "qunit": "1.18.0",
    "bootstrap-sass": "~3.3.5",
    "bootstrap": "~3.3.5",
    "plupload": "v2.1.8",
    "dinosheets": "0.1.1"
  },
  "resolutions": {
    "qunit": "~1.18.0"
  }
}

ember --version / install

❯ ember --version
version: 1.13.12
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
node: 5.4.0
npm: 2.14.10
os: linux x64

~/Projects/bp/macsi-ember-frontend master*
❯ ember install liquid-fire
version: 1.13.12
Could not find watchman, falling back to NodeWatcher for file system events.
Visit http://www.ember-cli.com/user-guide/#watchman for more info.
Installed packages for tooling via npm.
Installed addon package.
iamsebastian commented 7 years ago

I've noticed, that app is building, but not more than that. Get an error if I load the page. Just have to remove liquid-fire, maybe, untill I can upgrade to a newer ember-version (At the moment, I have to support IE8, for some time, until the last customer has upgraded his infrastructure)

Error: Could not find module `liquid-fire/ember-internals/version-specific` imported from `liquid-fire/ember-internals`
requireFrom()
vendor.js:119
reify()
vendor.js:106
requireModule/<()
vendor.js:149
tryFinally()
vendor.js:30
requireModule()
vendor.js:148
requireFrom()
vendor.js:121
reify()
vendor.js:106
requireModule/<()
vendor.js:149
tryFinally()
vendor.js:30
requireModule()
vendor.js:148
.default/<()
vendor.js:70789
forEach()
self-hosted
.default()
vendor.js:70777
<anonymous>
macsi-ember-frontend.js:154
requireModule/<()
vendor.js:150
tryFinally()
vendor.js:30
requireModule()
vendor.js:148
<anonymous>
macsi-ember-frontend.js:20258
vendor.js:119:13
iamsebastian commented 7 years ago

Tried different versions: The 0.25.0 was the last working version as a dependency in my project.

ef4 commented 7 years ago

You mention IE8 support, but that is determined by the Ember version, not the ember-cli version.

Your Ember version is currently 1.13.10. You can keep that if you need to.

Your ember-cli version is currently 1.13.12. You should upgrade that. You will probably get a nicer development experience if you do -- newer versions have faster builds, live updating of CSS, etc.

DuBistKomisch commented 7 years ago

Also seeing this with ember-cli 1.13, but I'm upgrading liquid-fire as part of updating everything to ember 2 anyway. Would have assumed supporting ember 1.13 implies ember-cli 1.13 though.

ef4 commented 7 years ago

It's a fair assumption to make and I will happily merge a PR if somebody wants to work on this. The harder part is getting more versions of ember-cli under CI testing.

iamsebastian commented 7 years ago

As I've upgraded to ember-cli 2.9, I also can not test this anymore, or could write any PR.