Could not find module `ember-resolver` imported from `AppName/resolver Ember tests

拟墨画扇 提交于 2019-12-05 07:24:28
Sandeep

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.

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' });

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!