Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server not serving css for examples #636

Closed
100ideas opened this issue Dec 2, 2016 · 2 comments
Closed

Server not serving css for examples #636

100ideas opened this issue Dec 2, 2016 · 2 comments
Assignees

Comments

@100ideas
Copy link

100ideas commented Dec 2, 2016

using Eve commit 21893e3 on osx El Capitan, node v7.0.0 npm v3.10.8.

After npm install and npm start, Eve opens and behaves as expected with the examples landing page when I point my browser to localhost:8080.

But the styling applied to the elements in the output pane of the editor for the CRM.eve and todomvc.eve examples is broken - for some reason my local Eve server doesn't seem to be serving the examples/**/*.css. My console complains about the css files being transferred with the wrong MIME type, not sure if that matters.

renderer.ts:302 Unable to set 'tag' multiple times on entity Object {tag: Array[3], class: Array[1], children: Array[2], eve-auto-index: Array[1]} ["div", "more", "nav"]renderRecords @ renderer.ts:302renderOnChange @ client.ts:339Index.dispatchIfDirty @ db.ts:37handleDiff @ client.ts:117EveClient._result @ client.ts:250EveClient.onMessage @ client.ts:242(anonymous function) @ browser.ts:52
... (repeaded 3x)...
renderer.ts:439 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/examples/css/crm.css".

When I check the hosted example at http://play.witheve.com/#/examples/CRM.eve, I see the css files are loading ok, and http://play.witheve.com/examples/css/crm.css loads in my browser.

However, If I navigate to http://localhost:8080/examples/css/crm.css, here's what I get:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/examples/css/src/codemirror.css".
crm.css:5 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/examples/css/src/simplescrollbars.css".
crm.css:6 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/examples/css/css/ionicons.min.css".
crm.css:18 Resource interpreted as Stylesheet but transferred with MIME type text/html: "http://localhost:8080/examples/css/css/ide.css".
workspaces.js:1 Uncaught SyntaxError: Unexpected token <
uuid.js:1 Uncaught SyntaxError: Unexpected token <
codemirror.js:1 Uncaught SyntaxError: Unexpected token <
simplescrollbars.js:1 Uncaught SyntaxError: Unexpected token <
annotatescrollbar.js:1 Uncaught SyntaxError: Unexpected token <
commonmark.js:1 Uncaught SyntaxError: Unexpected token <
microReact.js:1 Uncaught SyntaxError: Unexpected token <
system.js:1 Uncaught SyntaxError: Unexpected token <
crm.css:31 Uncaught ReferenceError: SystemJS is not defined(…)

Anyone else seeing this problem?

For now I have just started serving the css files with a separate local web server, or dropping in the URL for them on the EVE servers, i.e. in CRM.eve line 53:

bind @browser
  [#link rel: "stylesheet" href: "http://play.witheve.com/examples/css/crm.css"]
  [#div #container class: "container" children:
    [#div class: "scroll" children:
      [#div class: "banner"]
@cmontella
Copy link
Contributor

I can confirm this is happening.... will investigate.

@cmontella
Copy link
Contributor

Our solution here is going to be to move file serving to a single assets folder, which should fix this issue. Also renaming the issue, because it's not platform dependent.

@cmontella cmontella changed the title os.x dev server not serving examples CSS Server not serving css for examples Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants