Upgraded to 2.15.1 from 2.11. App no longer runs


#1

Hi there,

I’ve just upgraded 2.15.1. I followed the release instructions, ran ember init and carefully parsed through and merged the diffs of the files. Now, when running my app with ember s, I get this error:

WARNING: Node v8.6.0 is not tested against Ember CLI on your platform. We recommend that you use the most-recent "Active LTS" version of Node.js.
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
'instrument' is imported from external module 'ember-data/-debug' but never used
The Broccoli Plugin: [BroccoliMergeTrees: TreeMerger (addons)] failed with:
Error: modules/ember-cli-app-version/initializer-factory.js: Plugin '0' not found
    at Parser.loadPlugins (/Users/awesomeuser/Workspace/my-simple-app/node_modules/babylon/lib/parser/index.js:61:26)
    at new Parser (/Users/awesomeuser/Workspace/my-simple-app/node_modules/babylon/lib/parser/index.js:42:10)
    at parse (/Users/awesomeuser/Workspace/my-simple-app/node_modules/babylon/lib/index.js:45:10)
    at File.parse (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/babel-core/lib/transformation/file/index.js:517:15)
    at File.parseCode (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/babel-core/lib/transformation/file/index.js:602:20)
    at /Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/babel-core/lib/transformation/pipeline.js:49:12
    at File.wrap (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/babel-core/lib/transformation/file/index.js:564:16)
    at Pipeline.transform (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/babel-core/lib/transformation/pipeline.js:47:17)
    at Promise (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli-app-version/node_modules/broccoli-babel-transpiler/lib/parallel-api.js:102:26)
    at initializePromise (/Users/awesomeuser/Workspace/my-simple-app/node_modules/rsvp/dist/rsvp.js:567:5)

The broccoli plugin was instantiated at:
    at BroccoliMergeTrees.Plugin (/Users/awesomeuser/Workspace/my-simple-app/node_modules/broccoli-plugin/index.js:7:31)
    at new BroccoliMergeTrees (/Users/awesomeuser/Workspace/my-simple-app/node_modules/broccoli-merge-trees/index.js:42:10)
    at BroccoliMergeTrees (/Users/awesomeuser/Workspace/my-simple-app/node_modules/broccoli-merge-trees/index.js:36:53)
    at mergeTrees (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/merge-trees.js:46:18)
    at EmberApp._addonTree (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:929:20)
    at EmberApp._processedVendorTree (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:974:20)
    at EmberApp._processedExternalTree (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1005:21)
    at EmberApp.appAndDependencies (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1114:30)
    at EmberApp.javascript (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1244:34)
    at EmberApp.toArray (/Users/awesomeuser/Workspace/my-simple-app/node_modules/ember-cli/lib/broccoli/ember-app.js:1674:10)

Any ideas?


#2

Looks like it’s something with ember-cli-app-version… have you tried upgrading that to the latest version? Or making sure it’s installed correctly? Or trying the app without it installed and then installing it again?


#3

Hi @dknutsen, thanks for your suggestions.

have you tried upgrading that to the latest version

When you say the latest version, 2.15.1 is the latest non-beta release. Are you referring to use the 2.16-beta? I really don’t take another risk on a beta release.

making sure it’s installed properly

How would you determine that?

Or trying the app without it installed and then installing it again

How would I do this?

Thanks again for your help!


#4

Sorry, should have been more specific. I meant all those questions specifically in reference to the ember-cli-app-version addon. I think it may be added to a new CLI project by default. Anyway, it looks like in your case something may be going wrong with that. If you haven’t tried doing a full npm clean (I usually run rm -rf node_modules && npm cache clean && npm install) I would try that first. If that doesn’t work, check your version number of ember-cli-app-version against the latest release. Next maybe try removing the ember-cli-app-version entry from your package.json, deleting node_modules/ember-cli-app-version, and running again. If that works, try installing it manually via ember install ember-cli-app-version.

Anyway, I’m kinda taking stabs in the dark here but that’s what I’d try first.


#5

Thanks @dknutsen. That was helpful. Turns out that the app was still running version 2.11 even though my global was at 2.15.1.

It’s now moved onto a new error.

ember-metal.js:3988 TypeError: Cannot read property 'getAttribute' of undefined
    at exports.default.buildOutletTree (<anonymous>:1333:47)
    at exports.default.build (<anonymous>:1305:31)
    at Class.viewTree (<anonymous>:4612:33)
    at later (<anonymous>:4586:25)
    at fn (backburner.js:697)
    at invokeWithOnError (backburner.js:281)
    at Queue.flush (backburner.js:152)
    at DeferredActionQueues.flush (backburner.js:343)
    at Backburner.end (backburner.js:451)
    at Backburner._runExpiredTimers (backburner.js:893)

#6

Having a look at the entirety of changes for an ember-cli-project can be useful too to see if you haven’t missed a dependency upgrade.

Following that comparison may help:


#7

:arrow_up:️:arrow_up:️:arrow_up:️ This is your answer and how you should upgrade in the future. I hated using ember init and it overriding everything. The ember new output let’s you see just the changes from your current version to the one you’re going to and make the changes yourself


#8

Also, there is an addon called ember-cli-upgrade which upgrades your app or addon using git merge to ensure blueprint changes get included.