jspm / registry

The jspm registry and package.json override service
https://jspm.io
229 stars 256 forks source link

JSPM Override for SemanticUI #994

Closed abianciotto closed 6 years ago

abianciotto commented 7 years ago

I'm having problems installing SemanticUI library with jspm. Up until two weeks ago, "jspm install semantic-ui" worked fine for me. Since last week however, the same command (actually "jspm install npm:semantic-ui") gives me this error:

warn Error on locate for github:derekslife/wrench-js/tarball/156eaceed68ed31ffe2a3ecfbcb2be6ed1417fb2 GitHub packages must be of the form owner/repo. warn Error locating github:derekslife/wrench-js/tarball/156eaceed68ed31ffe2a3ecfbcb2be6ed1417fb2. err Error locating github:derekslife/wrench-js/tarball/156eaceed68ed31ffe2a3ecfbcb2be6ed1417fb2.

Indeed the above-mentioned tarball does not seem to exist, and I don't understand why the reference is now broken. A working reference may be https://github.com/derekslife/wrench-js instead. Trying "jspm install semantic-ui=github:Semantic-Org/Semantic-UI" does run to the end but gives me few warnings:

warn github:Semantic-Org/Semantic-UI@2.2.6 dependency installs skipped as it's a GitHub package with no registry property set. If the dependencies aren't needed ignore this message. Alternatively set a registry or dependencies override or use the npm registry version at jspm install npm:semantic-ui@^2.2.6 instead. warn Main entry point not found for github:Semantic-Org/Semantic-UI@2.2.6. Adjust this property in the package.json or with an override, setting "main": false if this is the intention.

and dependencies are not installed, so I get 404s when loading the app I wrote with the Aurelia framework. Hope someone can figure out why this SemanticUI package suddenly broke.

guybedford commented 7 years ago

If one of the dependencies is set to an exact github reference in the npm package.json, then you can fix that with a dependencies override to use a different version of wrench-js that jspm can correctly install.

I can assist with this override, but jspm install semantic-ui does seem to be working fine for me in both jspm 0.17 and 0.16, perhaps it's already been updated or you have a local override running here?

guybedford commented 7 years ago

Ahh it's jspm install npm:semantic-ui that's giving the problem here. Try writing override.json:

{
"dependencies": {
    "better-console": "*",
    "del": "^2.2.0",
    "extend": "^3.0.0",
    "gulp": "^3.9.1",
    "gulp-autoprefixer": "^3.1.0",
    "gulp-chmod": "^1.3.0",
    "gulp-clone": "^1.0.0",
    "gulp-concat": "^2.6.0",
    "gulp-concat-css": "^2.2.0",
    "gulp-copy": "0.0.2",
    "gulp-dedupe": "0.0.2",
    "gulp-flatten": "^0.2.0",
    "gulp-header": "^1.8.2",
    "gulp-help": "^1.6.1",
    "gulp-if": "^2.0.1",
    "gulp-json-editor": "^2.2.1",
    "gulp-less": "^3.1.0",
    "gulp-clean-css": "^2.0.6",
    "gulp-notify": "^2.2.0",
    "gulp-plumber": "^1.1.0",
    "gulp-print": "^2.0.1",
    "gulp-prompt": "^0.2.0",
    "gulp-rename": "^1.2.2",
    "gulp-replace": "^0.5.4",
    "gulp-rtlcss": "^1.0.0",
    "gulp-uglify": "^1.5.3",
    "gulp-util": "^3.0.7",
    "gulp-watch": "^4.3.5",
    "jquery": "^2.2.3 || ^3.0.0",
    "map-stream": "^0.1.0",
    "merge-stream": "^1.0.0",
    "mkdirp": "^0.5.1",
    "require-dot-file": "^0.4.0",
    "run-sequence": "^1.1.5",
    "wrench": "derekslife/wrench-js#master",
    "yamljs": "^0.2.7"
  }
}

and then jspm install npm:semantic-ui -o override.json.

Although it's probably advisable to use the github version with a modified override instead of installing all of that unnecessary gulp stuff there!

abianciotto commented 7 years ago

Thank you for your feedback. I'm using jspm version 0.16.47, npm version 3.10.9. The simple "jspm install semantic-ui" was working two weeks ago on an arch linux system, but fails on my debian linux (stretch) system. With the above command, jspm refuses to continue and suggests trying "jspm install npm:semantic-ui" instead. I tried the override you posted and it installed fine: the problem with wrench was gone. Unfortunately, it still did not work out of the box. I managed to get around a first error about npm/semantic-ui@2.2.6.js not being found (I created it manually based on the analogous file from the aurelia-framework package) but then I was stuck with the app complaining about jQuery's $ symbol not being defined. I then followed your advice and uninstalled npm:semantic-ui and installed semantic-ui=github:Semantic-Org/Semantic-UI instead, applying the following override taken from past issue #306 (https://github.com/jspm/registry/issues/306):

{ "directories": { "lib": "dist" }, "main": "semantic", "shim": { "semantic": { "deps": [ "jquery", "semantic-ui/semantic.css!" ] } }, "dependencies": { "jquery": "github:components/jquery", "css": "github:systemjs/plugin-css" } }

and this finally worked! I still don't understand why both the npm and github packages, which were working fine some 10 days ago, got suddenly broken (at least on my system). Hope the semantic-ui package will stabilize with time alongside jspm because until now it gave me quite some headaches. Thank you again for your support.

abianciotto commented 7 years ago

The issue could be closed from my side, but I'm leaving it open for you to add some comments if you wish. Thank you

frank-dspeed commented 6 years ago

@abianciotto closes this please he don't viewed your comments

aluanhaddad commented 6 years ago

@frank-dspeed are you having issues with this package?

frank-dspeed commented 6 years ago

@aluanhaddad no issues at present so this can be closed he also wrote there is no issue

aluanhaddad commented 6 years ago

Thanks just checking.