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

import Dialog gets error #6

Closed
hervejegou opened this issue May 8, 2016 · 3 comments
Closed

import Dialog gets error #6

hervejegou opened this issue May 8, 2016 · 3 comments

Comments

@hervejegou
Copy link

hervejegou commented May 8, 2016

Hi Nathan: I am using meteor with react-toolbox and css modules and mostly it works great. While trying to use the Dialog component I got error Cannot find module './style.scss' after importing Dialog component. Cant find ways to fix it so any help or pointer would be great.

Replicate the error using your template:

  1. download, install and using template with no modifications
  2. only add import Dialog from 'react-toolbox/lib/dialog'; to client/components/index.jsx and reload

=> get the error: Cannot find module './style.scss'

It seems the failure to load occurs in Dialog.js component. I cannot find ways to fix that??
Here is the full error log:

install.js:78Uncaught Error: Cannot find module './style.scss'require @ install.js:78meteorInstall.node_modules.react-toolbox.lib.dialog.Dialog.js @ Dialog.js:25fileEvaluate @ install.js:141require @ install.js:75meteorInstall.node_modules.react-toolbox.lib.dialog.index.js @ index.js:8fileEvaluate @ install.js:141require @ install.js:75meteorInstall.client.index.jsx @ index.jsx:5fileEvaluate @ install.js:141require @ install.js:75(anonymous function) @ app.js?hash=888aa27…:191
@hervejegou
Copy link
Author

hervejegou commented May 12, 2016

Hi Nathan: UPDATED
it seems that the error is with dialog component only. I tried to import DatePicker (which relies on dialog component) and it gives the same error likely because it tries to load dialog component...
Dialog.js fails at line 25: var _style = require('./style.scss');

I found a workaround for now:

  • copy the dialog/style.scss file to another folder in my project ie '/imports/ui/client/fix/style.scss'
  • import it in Dialog.js at line 25: var _style = require('/imports/ui/client/fix/style.scss');

Then it all works again... I am using a lot of other react-toolbox components with your setup and do not get errors.

We still have to include all style.scss in a parent client folder to avoid errors: this issue is reported in css-modules - issue 29

@akanix42
Copy link
Owner

Oops, I dropped the ball on this one.. there have been a lot of changes since then, are you still experiencing this issue?

@hervejegou
Copy link
Author

@nathantreid : yes I updated to latest version and it works great now... bug is gone... thanks.

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

2 participants