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

admin interface isn't styled #2325

Closed
howdoicomputer opened this issue Feb 23, 2016 · 23 comments
Closed

admin interface isn't styled #2325

howdoicomputer opened this issue Feb 23, 2016 · 23 comments

Comments

@howdoicomputer
Copy link

ReferenceError: Unknown keystone list "styles"
    at list (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\keystone\lib\core\list.js:12:18)
    at C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\keystone\lib\core\routes.js:55:24
    at Layer.handle [as handle_request] (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:131:13)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at Route.dispatch (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:277:22
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:349:14)
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:365:14)
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:365:14)
GET /keystone/styles/keystone.min.css 500 30.914 ms
GET /keystone/js/lib/underscore/underscore-1.5.1.min.js 404 30.570 ms
GET /keystone/js/lib/jquery/jquery-1.10.2.min.js 404 5.353 ms
GET /keystone/js/lib/async/async.js 404 5.512 ms
GET /keystone/js/lib/bootstrap/collapse.js 404 5.803 ms
GET /keystone/js/lib/bootstrap/dropdown.js 404 6.061 ms
GET /keystone/js/lib/bootstrap/tooltip.js 404 7.491 ms
GET /keystone/js/lib/bootstrap/button.js 404 7.498 ms
GET /keystone/js/lib/moment/moment-1.7.2.min.js 404 6.072 ms
GET /keystone/js/lib/move/move-0.1.1.min.js 404 6.398 ms
GET /keystone/js/lib/select2/select2-3.3.2.min.js 404 7.755 ms
GET /keystone/js/lib/pikaday/pikaday-1.1.0.js 404 8.673 ms
GET /keystone/js/lib/pikaday/pikaday.jquery-1.1.0.js 404 5.453 ms
GET /keystone/js/lib/jquery-placeholder-shim/jquery-placeholder-shim.js 404 5.363 ms
GET /keystone/js/lib/tinymce/tinymce.min.js 404 4.738 ms
GET /keystone/js/common/plugins.js 404 4.775 ms
GET /keystone/js/common/ui.js 404 4.876 ms
GET /keystone/js/common/ui-alt-text.js 404 4.981 ms
Error thrown for request: /keystone/js/packages.js
ReferenceError: Unknown keystone list "js"
    at list (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\keystone\lib\core\list.js:12:18)
    at C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\keystone\lib\core\routes.js:55:24
    at Layer.handle [as handle_request] (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\layer.js:95:5)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:131:13)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at next (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:125:14)
    at Route.dispatch (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\route.js:112:3)
    at Layer.handle [as handle_request] (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\layer.js:95:5)
    at C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:277:22
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:349:14)
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:365:14)
    at param (C:\Users\drfra\OneDrive\Documents\GitHub\godostuff\node_modules\express\lib\router\index.js:365:14)

Keystone: 0.3.16
Node: 5.7.0
Platform: Windows 10

I created my project via the generator so, uh, yeah. I haven't tested this on OS X yet.

@howdoicomputer
Copy link
Author

Missed out a part of my stacktrace: Error thrown for request: /keystone/styles/keystone.min.css

@howdoicomputer
Copy link
Author

Possible duplicate: keystonejs/keystone#1295

Except my problem is consistent.

@raduchiriac
Copy link

I had to downgrade to v5.6.0, dunno yet why 5.7.0 is causing this

@morenoh149
Copy link
Contributor

anything here jump out? https://nodejs.org/en/blog/release/v5.7.0/

@jacargentina
Copy link
Contributor

I think its related to this change in Node 5.7.0

nodejs/node#5383

I've "fixed" it on keystone code itself, but i dont even know if my fix will work on a fixed Node post 5.7.0

@crawft
Copy link

crawft commented Feb 29, 2016

My admin broke after updating nodemon, the /js and /styles routes were not being handled properly and If I had auth turned off I was getting ReferenceErrors because keystone was treating them as lists. With auth on, they were giving 302s and I couldn't login. I discovered nodemon had updated node to 5.7.0, so downgraded it to 5.6.0. At that point things seemed to be served but the admin was just giving a blank screen, no errors anywhere. I removed nodemon and that fixed it.

@dracupid
Copy link
Contributor

dracupid commented Mar 4, 2016

[email protected] has been released but my issue still exists. However nodejs/node#5383 has been fixed.

@creynders
Copy link
Contributor

I really think we should restrict support to LTS, no @JedWatson?

@holm
Copy link

holm commented Mar 6, 2016

I think it would be a real shame to limit support to LTS. I think it will also bit a bit harsh to do retrospectively. I would guess quite a lot are on 5.x, using some of the newer language features, and if they cannot upgrade to the latest version of 5.x on the security update, then they will be a though position.

@JedWatson
Copy link
Member

I'm not particularly keen to limit support to LTS either, we're using 5.6 for a new project too :)

Not sure that not supporting new versions of node is a good solution (if we added something that breaks w/ an older version of node, that's another issue, ideally going forward we'll maintain versions for compatibility with LTS releases)

The other issue is it's not friendly to newcomers who'll install the latest node and expect Keystone to work. I think requiring older node versions would be a bit antagonistic to community growth, which is the opposite of what we want!

Kind of challenging though in the sense that I'm focused on getting our internals cleaned up for the new API to go live and finally hitting a 0.4 release of Keystone. This is a pain.

@jacargentina what was your fix?

@misterhtmlcss
Copy link

Guys, I got this and I'm new to Keystone and developing general and while I think this discussion is very interesting, I'm here to know how to fix the issue today. Is there a work around? Can I fix it on my end or do I have to wait for another release of either Nodejs or KSjs and if so, which one should I wait for?

Please and thank you!

PS./FYI. I'm a Free Code Camper guy btw and so I think I'd represent a type that may try Keystone, so feel free if you like to message and ask me stuff in the future is all I'm saying if you think there is value in my user demographic.

@blingerson
Copy link

@pythonlabsstudent, you just need to use Node <= 5.6.0 for now

@jacargentina
Copy link
Contributor

@JedWatson Remember the "path changes" you pointed on my PR for lodash migration? Its already fixed there

https://github.com/keystonejs/keystone/blob/master/admin/server/app/createStaticRouter.js

There is a regression on NodeJS 5.7.0 path module: the path on line 51 was:

router.use('/styles', less(path.resolve(__dirname + '../../../public/styles'), lessOptions));

resolved to something like

/home/.../keystone/admin/server/app../../../public/styles

Note how the path concatenates the app part with ..

I've simply found that the real path to be resolved should be:

/home/.../keystone/admin/server/app/../../public/styles

Then removed the initial .. from there! And everything started working on my setup.

@JedWatson
Copy link
Member

So actually @pythonlabsstudent it should work if you use the latest code in keystone's master branch - could you try that and let me know if it works for you? would be super helpful :)

@okjake
Copy link

okjake commented Mar 9, 2016

@JedWatson I've just tested this - can confirm that this is fixed in the master branch for node >= 5.7.0

@JedWatson
Copy link
Member

Great, thanks @okjake! this looks good to close now. If anyone is still having issues let me know.

@kat-liger
Copy link

Hi @JedWatson, I am another person who is new to Keystone and faced this issue. I am using yeoman generator to create a project, and the issue is still there even if I create one from scratch. It works with node 5.6.0 but not with the latest one. How should I go about updating my Keystone installation from the latest master branch? Is there any documentation on Keystone updates in general?

@raduchiriac
Copy link

Since there wasn't a version bump on npm is git clone https://github.com/keystonejs/keystone.git node_modules/ the right way one would grab the master branch?

@snowkeeper
Copy link
Contributor

For npm use npm i keystonejs/keystone

@kat-liger
Copy link

Thank you, @snowkeeper, that helped!

@andrejp
Copy link

andrejp commented Mar 22, 2016

Can I ask to someone put simple step-by-step instruction how to install it ? Still struggling to get it right. I assume there is some issue with sequence of my steps. Initially I installed it with yeoman generator. However I executed npm i keystonejs/keystone in the project folder and it didn't resolved the issue. Downgrading to older nodejs version is not a good option since there are other dependencies and API changes.

@kat-liger you mentioned that it worked for you can you please maybe put sequence of steps you have executed. I just want to make sure I run it correctly. Already spend too much time on this and I need to get going.

Thank you in advance.
I think it will be helpful also for other people who run into the same issue.

@kat-liger
Copy link

@andrejp, the command referenced above was literally all I had to run. After you created a project with "yo keystone", try running "npm i keystonejs/keystone" and then "npm install". Hope it helps!

@andrejp
Copy link

andrejp commented Mar 23, 2016

@kat-liger Thank you very much for your clarification.

I have finally made it work. npm i keystonejs/keystone had no effect in my case for some reasons. After I executed yo keystone, Yo installed keystone@^0.3.16 in ~/project/node_modules.

First I npm uninstall keystone@^0.3.16 then again npm i keystonejs/keystone and after that I see different version of keystone has been installed keystone@^0.4.0-alpha

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