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

Styles aren't loaded #27

Open
josephbuchma opened this issue May 16, 2018 · 7 comments
Open

Styles aren't loaded #27

josephbuchma opened this issue May 16, 2018 · 7 comments

Comments

@josephbuchma
Copy link

Having a bunch of errors like this:

GET file:///home/joseph/projects/SWS/vidplan/app/dist/PhotonOriginal/styles/cocoa.css net::ERR_FILE_NOT_FOUND

Manual juggling with stylesheets is not mentioned in README, so I guess something went wrong way ?

@MauriceConrad
Copy link
Owner

Okay I have an idea. You are trying to use the browserified version, right?

In this case you have to define the base directory for loading the photon components relative from ‘/dist’

You can do this,

@josephbuchma
Copy link
Author

@MauriceConrad no, I'm trying to use not browserified version. I have a project based on this boilerplate for electron.

@MauriceConrad MauriceConrad reopened this May 17, 2018
@iafelix
Copy link

iafelix commented May 25, 2018

I am facing the same issue and the problem is the directory "fonts" does not exists under the path "../app/dist/PhotonOriginal/"
As a workaround till the bug is fixed this is what I've done:

  1. Download the photonkit
    https://github.com/connors/photon/releases/download/v0.1.2-alpha/photon-0.1.2-dist.zip
  2. Extract the zip file then copy the fonts folder to the app folder
    "../app/dist/PhotonOriginal/"

Hopefully you fixed it soon, it's a real quick fix indeed

@MauriceConrad
Copy link
Owner

@iafelix First of all, this is a completely different issue because @josephbuchma faces problems with the general requirement of Photon but you are trying to load original font file I originally did not wanted to contain.
But now, I did it. For me personally, Photon's original idea of font based icons is a dirty solution but you had a point: It is not very complex to include the original fonts.

You have to keep in mind that my version of Photon is based on the original framework but does provide a completely different API. I recommend to use SVG based icons instead of font based ones ;-)

@MauriceConrad
Copy link
Owner

MauriceConrad commented May 27, 2018

@josephbuchma Okay sorry for answering so late.

I do not hie any idea what exactly is not working in your environment but hopefully, I have a solution.

Detailed

Photon loads each component directly from a dist/ folder that is, in default, relative to the photon.js file. The required module tries to get this path automatically using __dirname. I do not know, what is wrong with your folder structure or environment but all in all, your error means that the dist/ folder, your instance is using, does not exist.

Solution

Set Photon.__baseDir manually to the /dist directory you contain all the components (Just use Photons default /dist).

Can you give me some feedback about your troubleshooting?

@tolawho
Copy link

tolawho commented Nov 19, 2018

@MauriceConrad please fix this issue. I have same issue
image

@mrdotkg
Copy link

mrdotkg commented May 13, 2019

Same issue here.

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

5 participants