Upgrading from 2.12 to 2.17 with error: Could not find module ember-resolver

I’m upgrading from 2.12.2 → 2.17 and I don’t know the cause of the error: “Could not find module ember-resolver imported from my-app/resolver”.

I was using ember-cli-update to do the upgrade.

Hi, @Garrick!

  1. Do you have a file resolver.js in the root folder with code in it:

    import Resolver from 'ember-resolver';
    export default Resolver;
  2. Do you have in your devDependencies "ember-resolver": "^4.0.0", package?

  3. How and where do you import Resolver?

Hi @yuriyk!

  1. I have a resolver.js file in the app folder with the code you described.
  2. Yes, I have "ember-resolver": "^4.0.0" in the devDependencies of the package.json.
  3. app/app.js has code to import the resolver with the following:
    import Resolver from './resolver';

Hmm. All looks good, like in my app. Would be good, if you could share your issue via https://ember-twiddle.com

Hello @Garrick,

I have just finished migrating my app from 2.12.1 to 2.17.1. I do not have an answer for your problem but I want to share silly a technique that I use in Rails and Ember that has given me great results.

First I creat a new empty app using Ember 2.17.1.

Then I use a diff tool like kaleidoscope on mac os or meld on all the platforms and compare my app’s folder with the new app folder.

I compare file by file and overwrite only the modified lines in my old app.

In practice it is easier than it sounds.

If you have already upgraded you app using ember-cli-update it does not do any harm to compare your migrated app with a brand new ember app. Perhaps you can spot something missing or incorrectly migrated.

Hope this helps.

@hectorsq Thanks for the suggestion!

I tried doing something similar, with a brand new app and just diffing the changes as best I could with Webstorms tools.

After a while, I basically started my application from scratch and reverting deleted files and changes here and there starting with the package.json, and them changes in my ember-cli-build.js, configs, and additional folder changes.

So, I think I’ve found the problem which I filed an issue with ember-cli and PR to fix it!

The issue is that changes in 2.17.x introduced an issue with outputPaths.vendor.js options.

That’s for help to look into the issue, everyone!

1 Like

This error is also caused by having this in your ember-cli-build.js. I was on version 3.4.0 and I had the code below which caused an error. Removed it and the error went away.

app.import({ development:'bower_components/ember/ember-template-compiler.js' });