Semantic-UI-CSS icon indicating copy to clipboard operation
Semantic-UI-CSS copied to clipboard

Problems getting semantic:ui-css on Meteor 1.4.x

Open chompomonim opened this issue 9 years ago • 16 comments

$ meteor add semantic:ui-css => Errors while adding packages:

While checking for semantic:[email protected]: error: No compatible binary build found for this package. Contact the package author and ask them to publish it for your platform.

chompomonim avatar Sep 23 '16 00:09 chompomonim

I'm having this problem too. Which is funny -- I thought that meteor 1.4 was doing away with binaries published by package authors. At any rate, I have a compatible toolchain installed, as I was able to meteor npm install bcrypt without trouble.

cheesington avatar Sep 23 '16 21:09 cheesington

A workaround was posted on #20, which is to set a previous version for now:

meteor add semantic:ui-css@=2.1.2

cheesington avatar Sep 23 '16 21:09 cheesington

Ironically I'm also getting this same message with some other packages I depend on in 1.4.x, and not sure how to solve for myself.

jlukic avatar Sep 25 '16 15:09 jlukic

@jlukic Which packages exactly are you having problems with? Maybe someone could help with that?

apendua avatar Oct 31 '16 16:10 apendua

For what it's worth, here's the package.js file that I am using to define a local smart package and I can fetch whatever version of semmantic-ui-css from npm, and it works perfectly well.

/*globals Package, Npm*/
Package.describe({
  name        : 'essentials:semantic-ui',
  version     : '2.2.4',
  description : 'A wrapper for semantic-ui',
});

Npm.depends({
  'semantic-ui-css': '2.2.4',
});

Package.onUse(function (api) {
  api.versionsFrom('1.4');
  api.use('jquery', 'client');
  api.addFiles([
    '.npm/package/node_modules/semantic-ui-css/semantic.js',
    '.npm/package/node_modules/semantic-ui-css/semantic.css',
  ], 'client');
  api.addAssets([
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.eot',
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.otf',
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.svg',
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.ttf',
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.woff',
    '.npm/package/node_modules/semantic-ui-css/themes/default/assets/fonts/icons.woff2',
  ], 'client');
});

apendua avatar Nov 01 '16 10:11 apendua

I looked into package.js and what I think is wrong with it are the following two points:

  1. We should be using addAssets instead of addFiles for fonts and images.
  2. Using versions('1.0') can force and outdated versions of some packages, which is probably the main source of the problem described in this ticket. Look here.

apendua avatar Nov 01 '16 10:11 apendua

Could you please fix this?

DimitryDushkin avatar Nov 06 '16 07:11 DimitryDushkin

Yeah, the package won't install for me either. Having to use v2.1.2 in order for it to work. :/

samwightt avatar Nov 19 '16 13:11 samwightt

how do i fix this, I need some 2.2 features

s-devaney avatar Dec 18 '16 13:12 s-devaney

@s-devaney The best workaround I can think of is creating a local semantic-ui package using the code I pasted in my comment above:

https://github.com/Semantic-Org/Semantic-UI-CSS/issues/23#issuecomment-257533357

This will allow you to choose whatever version you want.

apendua avatar Dec 18 '16 15:12 apendua

@apendua why you still need meteor package for that? Pure npm package is not enough?

chompomonim avatar Dec 19 '16 06:12 chompomonim

@chompomonim That's a very good question. The only reason I think you will need a package in this particular case is importing font assets. If it was only about css and js files, you should be able to import them directly into your project with no problems. However, with the current meteor build system, I don't see a clear way (without modifying paths in css) to have those assets included properly without a wrapper package.

apendua avatar Dec 19 '16 07:12 apendua

I've tried importing the npm package and I can't get it to work - lots of issues with relative paths to fonts etc not playing nice with the meteor build tool...

s-devaney avatar Dec 19 '16 22:12 s-devaney

@apendua do you have any instructions on how to add your local smart package to my project?

EDIT: got it working. For others:

  1. Uninstall any Semantic Atmosphere or NPM packages
  2. Create a packages directory at the root of your project
  3. Create a semantic directory within that
  4. Paste the code above into a package.js file. Save it within the new semantic directory
  5. Run meteor add essentials:semantic-ui to install the local package
  6. Run meteor build and it should work...

s-devaney avatar Dec 19 '16 22:12 s-devaney

@s-devaney It's great you figured that out. Sorry I couldn't respond earlier, it's a timezone difference problem.

apendua avatar Dec 20 '16 09:12 apendua

check the last comment on #38

ghost avatar Feb 23 '18 13:02 ghost