question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mirage is not working with an addon

See original GitHub issue

I’m trying to use Mirage 0.2.0-beta.3 inside an add-on with the dummy app. The first problem I ran into is:

Attempting to watch missing directory: /Users/bhunt/Documents/Code/OpenSource/ember-d3/mirage
Error: Attempting to watch missing directory: /Users/bhunt/Documents/Code/OpenSource/ember-d3/mirage
    at EventEmitter.Watcher_addWatchDir [as addWatchDir] (/Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/broccoli-sane-watcher/index.js:90:11)
    at /Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/broccoli/lib/builder.js:94:35
    at lib$rsvp$$internal$$tryCatch (/Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:493:16)
    at lib$rsvp$$internal$$invokeCallback (/Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:505:17)
    at /Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1001:13
    at lib$rsvp$asap$$flush (/Users/bhunt/Documents/Code/OpenSource/ember-d3/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)

If you work around this problem my creating an empty mirage directory at the project root, you then get:

Uncaught Error: Could not find module dummy/mirage/config imported from dummy/initializers/ember-cli-mirage

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
samselikoffcommented, Mar 28, 2019

@masterchef Could you open a new issue with a simplified reproduction?

1reaction
cibernoxcommented, Jan 31, 2016

Just to paste the solution I’ve found on the app side, even if this is addressed by ember-cli-mirage eventually.

Ensure that in the ember-cli-build.js you pass the proper folder to the mirage config.

  var app = new EmberAddon(defaults, {
    'ember-cli-mirage': {
      directory: path.resolve(__dirname, path.join('tests', 'dummy', 'mirage'))
    }
  });
Read more comments on GitHub >

github_iconTop Results From Across the Web

Mirage is not working with an addon · Issue #524 - GitHub
I'm trying to use Mirage 0.2.0-beta.3 inside an add-on with the dummy app. The first problem I ran into is: Attempting to watch...
Read more >
can't import the test helper addon in ember-cli-mirage
When running the app directly, the browser opens index.html which isn't loading tests.js. This file contains everything related to tests.
Read more >
Manually starting Mirage
Manually starting Mirage ... Currently, Mirage's server boots up in an Ember initializer. This means it will not automatically start in unit or...
Read more >
Welcome to Mirage's documentation! - Sinestesia
Welcome to Mirage's documentation! ... In the Addons tab, click the Install from File button at the bottom and select the Renderplus.zip you...
Read more >
About - Mirage JS
Build, test and demo your JavaScript application without an API.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found