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

Question: css-loader photon.min.css causes error during browserify #18

Open
sebastientromp opened this issue Nov 23, 2015 · 6 comments
Open

Comments

@sebastientromp
Copy link

Hello,

I'm trying to integrate react-photonkit in my js app using grunt-browserify. Everything works fine, except one error:

>> Error: Cannot find module '!!./../../../css-loader/index.js!./photon.min.css' from 'D:\Dev\Projects\coaching\yo\node_modules\react-photonkit\dist'

I couldn't find any photon.min.css anywhere, but even adding an empty css file didn't solve the issue.

I'm not at all familiar with the syntax with the exclamation marks, so I don't really know how to investigate.

Something that may be worth noting though is that running npm install doesn't install css-loader module. I tried to install it independently, but with no avail.

Moreover, running "cd ./../../.." from yo\node_modules\react-photonkit\dist goes back to `yo, and not node_modules. Changing that to ./../.. doesn't solve the issue however.

Commenting out the portion about css-loader fixes all issues.

Would you have any pointer that would help me figure out what is happening here?

Thanks for your help,
Sébastien

@importre
Copy link
Member

Sorry for the late replay. 😅
I will investigate.

@bradparks
Copy link

hey... i'm finding the same... can you put together a simple example of using this that doesn't use Electron? I'd love to use this in a new project, but am a bit new to the tooling that surrounds using react, etc. thanks!

@bradparks
Copy link

This worked for me if I installed it from npm. I was trying to use it from the git repo.

$ npm install react-photonkit

@importre
Copy link
Member

@bradparks
Thank you for the information.

@sebastientromp
As mentioned above, please put a simple project if not solved yet.

@bradparks
Copy link

and it may get merged, but here's the simple example I had for doing this as a Pull request, in the "example" folder.

#20

but, it appears that Git is adding it as a subproject or something, so I may be doing something weird here with my pull request... If so, I put the example here as well:

https://dl.dropboxusercontent.com/u/274922/photon_kit_example.zip

And you can just download it from there ;-)

@xiongjiabin
Copy link

                 if(!content.locals) {

102 /* module.hot.accept("!!./../../../css-loader/index.js!./photon.min.css", function() {
103 var newContent = require("!!./../../../css-loader/index.js!./photon.min.css");
104 if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
105 update(newContent);
106 });
107 */}

If I comment these in photon.js , the problem looked like fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants