8
votes

I am trying to run Ember tests and it gives this error saying Could not find module ember-resolver imported from `AppName/resolver.

I am not sure what is causing it. I am using Ember-cli-2.12.1. Any help would be appreciated. Thanks

2
did you try deleting node_modules and trying a clean npm install? - feanor07
@alptugd I tried that as well but did not work. - Sandeep
I was almost sure about your answer; but I still wanted to ask it. By the way is that a brand new project? did that happen during an update? can you give more insight? - feanor07
@alptugd NO It is not a brand new App . We had updated to 2.12 and I might have missed something after doing this -> npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install I am able to solve Ember-resolver issue But now am getting other error saying Error: Could not find module ember-qunit imported from test-helper` - Sandeep

2 Answers

5
votes

I am answering this since i have resolved it and if someone come across this issue then they can solve it.

Steps i did to resolve it.

  1. npm cache clear && bower cache clean && rm -rf node_modules bower_components && npm install && bower install

cleaned and reinstall Bower component and npm component.

  1. ember init

Then I started getting error saying could not found module ember-qunit, after digging i found out that i had a lib called cropperjs from bower which was creating some conflict with ember-qunit whenever i import it in ember-cli-build.js , I moved cropperjs to npm node_modules and my tests started running.

3
votes

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.

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