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

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

Open
chompomonim opened this issue Sep 23, 2016 · 16 comments
Open

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

chompomonim opened this issue Sep 23, 2016 · 16 comments

Comments

@chompomonim
Copy link

$ 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.

@cheesington
Copy link

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
Copy link

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

meteor add semantic:ui-css@=2.1.2

@jlukic
Copy link
Member

jlukic commented Sep 25, 2016

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.

@apendua
Copy link

apendua commented Oct 31, 2016

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

@apendua
Copy link

apendua commented Nov 1, 2016

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
Copy link

apendua commented Nov 1, 2016

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.

@DimitryDushkin
Copy link

Could you please fix this?

@samwightt
Copy link

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

@s-devaney
Copy link

how do i fix this, I need some 2.2 features

@apendua
Copy link

apendua commented Dec 18, 2016

@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:

#23 (comment)

This will allow you to choose whatever version you want.

@chompomonim
Copy link
Author

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

@apendua
Copy link

apendua commented Dec 19, 2016

@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.

@s-devaney
Copy link

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
Copy link

s-devaney commented Dec 19, 2016

@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...

@apendua
Copy link

apendua commented Dec 20, 2016

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

@ghost
Copy link

ghost commented Feb 23, 2018

check the last comment on #38

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

7 participants