grommet: Grommet not working with meteor 1.5

Hello:

I am using meteor 1.5 and I want to try grommet for mi next app.

I install grommet with: meteor npm install grommet --save

Later import the scss file in my Index component but I am getting the following error: `=> Errors prevented startup:

While building for web.browser: /node_modules/grommet/scss/hpinc/index.scss: Scss compiler error: File to import: {}/node_modules/grommet/scss/grommet-core/inuit-defaults/settings.defaults not found in file: …/grommet-core/settings`

I already saw and try the solutions described in the issue of meteor 1.3 ( https://github.com/grommet/grommet/issues/632 ) but none el them is working with the 1.5 version. Can any one point me in the right direction please?

Thanks

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

hey @mvmsaikrishna you probably installed Grommet 2 (which is in alpha mode right now).

To install Grommet 1.x you need to run npm install grommet@1.9.0

@cristiandley you’re a life saver! thanks!

Hi! i did it " work ". @AaronVasquez @alansouzati

{
	"includePaths": ["{}/node_modules/", "{}/node_modules/grommet/node_modules"]
}

and (of course… import scss at your main.js client-side)

import "grommet/scss/hpe/index";

if you struggle… i can upload a grommet-meteor-example-kit

Hey @windgaucho this issue appears to be related to one that I had a while ago when I was getting up and running with Grommet. I believe it comes down to the configuration of the sass-loader. You might want to take a look at the grommet-standalone project, particularly the sass-loader configuration object.

        {
          loader: 'sass-loader', options: {
            includePaths: ['./node_modules', './node_modules/grommet/node_modules']
          }
        }

I am not familiar enough with meteor to comment on how it should be configured, but hopefully this will get you moving in the right direction. Good luck!

EDIT: I was just reading the docs and it appears that meteor has a package that has similar configuration to the webpack sass-loader. Make sure the configuration of includePaths matches what I pasted in above.