xomaczar / ember-cli-styles-reloader

Reloads your app styles (ember-cli < 2.3.0)
MIT License
42 stars 10 forks source link

"Unable to determine the domain name" error #18

Open cesarizu opened 8 years ago

cesarizu commented 8 years ago

When running an ember-2.2.0 app, styles are not reloaded and when I reload the page I get the following message:

Unable to determine the domain name

Error: Unable to determine the domain name
  at new ClientRequest (_http_client.js:26:13)
  at Object.exports.request (http.js:31:10)
  at Object.exports.get (http.js:35:21)
  at Object.fileDidChange (/path/to/project/node_modules/ember-cli-styles-reloader/lib/styles-reloader.js:48:15)
  at emitOne (events.js:82:20)
  at EventEmitter.emit (events.js:169:7)
  at EventEmitter.Watcher.triggerChange (/path/to/project/node_modules/ember-cli/node_modules/broccoli-sane-watcher/index.js:122:8)
  at lib$rsvp$$internal$$tryCatch (/path/to/project/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:493:16)
  at lib$rsvp$$internal$$invokeCallback (/path/to/project/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:505:17)
  at lib$rsvp$$internal$$publish (/path/to/project/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:476:11)
  at lib$rsvp$asap$$flush (/path/to/project/node_modules/ember-cli/node_modules/rsvp/dist/rsvp.js:1198:9)
  at nextTickCallbackWith0Args (node.js:433:9)
  at process._tickDomainCallback (node.js:403:13)

How can I start debugging this?

schickm commented 8 years ago

I've run into the same issue, I'm using ember 2.2.0 and here's my current devDependencies from my package.json (if that's relevant):

"devDependencies": {
    "broccoli-asset-rev": "^2.2.0",
    "ember-cli": "1.13.13",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-babel": "^5.1.5",
    "ember-cli-content-security-policy": "0.4.0",
    "ember-cli-dependency-checker": "^1.1.0",
    "ember-cli-htmlbars": "^1.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-ic-ajax": "0.2.4",
    "ember-cli-inject-live-reload": "^1.3.1",
    "ember-cli-qunit": "^1.0.4",
    "ember-cli-release": "0.2.8",
    "ember-cli-sass": "^5.2.1",
    "ember-cli-sri": "^1.2.0",
    "ember-cli-styles-reloader": "0.1.8",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "1.13.15",
    "ember-disable-proxy-controllers": "^1.0.1",
    "ember-export-application-global": "^1.0.4"
  }
xomaczar commented 8 years ago

Can you provide more info please, are u byulding an addon, do you have ssl enabled?

DingoEatingFuzz commented 8 years ago

I am also experiencing this problem. It seems to be associated with ember-cli 1.13.13.

drewbaker commented 8 years ago

+1. Having the same issue.

jskeate commented 8 years ago

Looks like it's already fixed in master, with this:

https://github.com/xomaczar/ember-cli-styles-reloader/blob/master/lib/styles-reloader.js#L27

(specifically, the || 'localhost')

But it's not in the latest released version (which is almost 6 (!) months old)

Katamo commented 8 years ago

Meanwhile, you can launch your app with ember -s —host 'localhost'

michelegera commented 8 years ago

I am on ember-cli 2.3 and experiencing the same issue. Unfortunately, the workaround suggested by @Katamo is not working for me :disappointed:

xomaczar commented 8 years ago

@Katamo @michelegera @jskeate since ember-cli@^2.3.0 styles reloading comes out of box. If you are using ember-cli@^2.3.0, you should uninstall this addon, as it will conflict with the native mechanims. If you are not, why not?

michelegera commented 8 years ago

@xomaczar Yep, I uninstalled it since! Thanks!