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

Make LESS 3.x compatible #30

Closed
kohlikohl opened this issue Oct 16, 2017 · 22 comments
Closed

Make LESS 3.x compatible #30

kohlikohl opened this issue Oct 16, 2017 · 22 comments

Comments

@kohlikohl
Copy link

Tried to run this with the latest LESS 3.x (3.0.0-alpha.3) release and got following error:

SyntaxError: variable @googleProtocol is undefined in C:\dev\teams-client-sdk\packages\semantic-ui-less\definitions\globals\site.less
on line 25, column 1:
24
25 .loadFonts();
26

Not yet sure why though.

Everything works fine with version 2.7.2.

@davidpanzarella
Copy link

Any update on this? Less-Loader has been recently updated to support Less 3.0, so I'd assume any updates here should now be compatible with 3.0 as well.

@rayronvictor
Copy link

Same problem in less 3.0.1

@dongcai
Copy link

dongcai commented Apr 19, 2018

Have to roll back to less '2.7.3' to make it work.

Dromin added a commit to OpenWebslides/openwebslides-frontend that referenced this issue Apr 21, 2018
@josuevalrob
Copy link

Trying to run npm install semantic-ui -s on my angular cli project and got this:

/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/accord/lib/index.js:29
throw new Error(name + " version " + version + " is not currently supported");
^

Error: less version 3.0.4 is not currently supported
at Object.exports.load (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/accord/lib/index.js:29:13)
at Object. (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/gulp-less/index.js:9:29)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/semantic-ui/tasks/watch.js:17:18)

@josuevalrob
Copy link

Sorry for the silly question, but, how can I roll back my less version?

@atti187
Copy link

atti187 commented May 8, 2018

npm install [email protected] --save-dev

@josuevalrob
Copy link

Sorry, other silly question... If i run:
npm install --global [email protected] --save-dev
It shows me:

/Users/josue/.npm-packages/bin/lessc -> /Users/josue/.npm-packages/lib/node_modules/less/bin/lessc

Now, But If after that, I go inside the Angular project, and try
npm install semantic-ui
I got the same error:

Error: less version 3.0.4 is not currently supported
at Object.exports.load (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/accord/lib/index.js:29:13)
at Object. (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/gulp-less/index.js:9:29)
at Module._compile (internal/modules/cjs/loader.js:678:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:689:10)
at Module.load (internal/modules/cjs/loader.js:589:32)
at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
at Function.Module._load (internal/modules/cjs/loader.js:520:3)
at Module.require (internal/modules/cjs/loader.js:626:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/Users/josue/WebDevelop/angular/ng-book/semantic/node_modules/semantic-ui/tasks/watch.js:17:18)

The only way to make it work is running npm install [email protected] --save-dev and getting this:

  • [email protected]
    added 18 packages from 22 contributors, removed 6 packages, updated 1 package and moved 1 package in 27.923s

And now, I can start a semantic project by npm install semantic-ui

Is there any way to reinstall [email protected] globally?

RetroCraft added a commit to RetroCraft/volunteeringpeel that referenced this issue May 13, 2018
@0paIescent
Copy link

Does anyone feel that the four vulnerabilities found by npm audit are any danger?

@0paIescent
Copy link

@josuevalrob I'm pretty sure that what you'd need to do is just npm uninstall -g less, then reinstall with the correct version npm install -g [email protected].

@ingleo78
Copy link

I had the same problem as everyone, the solution I found was to install cjs and accord, then install semantic-ui and this time if it was allowed to install correctly

@sciyoshi
Copy link

sciyoshi commented Jun 7, 2018

I've opened a PR that fixes these issues: #44

Any theme.config will also need to be updated by adding (multiple) to the line importing theme.less.

@Vages
Copy link

Vages commented Jul 3, 2018

Great, @sciyoshi!

Just to make it darned clear to anyone:

@import "~semantic-ui-less/theme.less"; -> @import (multiple) "~semantic-ui-less/theme.less";

@Vages
Copy link

Vages commented Jul 3, 2018

Time to close this now, @kohlikohl?

@Serhansolo
Copy link

Serhansolo commented Jul 6, 2018

Guys, I am not sure but I am still getting an error my less version is apparently 3.x+ 😄

Error: less version 3.5.2 is not currently supported
at Object.exports.load (/Users/suy20680/Documents/Projects/test-semantic/test-app/node_modules/accord/lib/index.js:29:13)
at Object. (/Users/suy20680/Documents/Projects/test-semantic/test-app/node_modules/gulp-less/index.js:9:29)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object. (/Users/suy20680/Documents/Projects/test-semantic/test-app/node_modules/semantic-ui/tasks/watch.js:17:18)

@Vages
Copy link

Vages commented Jul 6, 2018

Remembered to change the import, @Serhansolo ?

@ThanosSiopoudis
Copy link

Looks like less 3.5.x has some breaking changes. 3.0.x works after this merge, but not 3.5.x
The problem is that in Less 3.5.x inline '@' expressions are no longer math'd (less/less.js#3265 (comment))

See error output below with Semantic-UI-Less 2.3.3 and less 3.5.3:

@ribbonOffset: ~"calc("-@ribbonMargin~" - "@ribbonTriangleSize~")";
^
Operation on an invalid type
      in /Users/[...]/node_modules/semantic-ui-less/themes/default/elements/label.variables (line 133, column 0)

@JonRowe
Copy link

JonRowe commented Jul 10, 2018

2.3.3 is also still broken on less 3.0.4 for me

@ThanosSiopoudis
Copy link

@JonRowe did you add (multiple) to your @import statement in theme.config? 2.3.3 and 3.0.4 works fine for me

@JonRowe
Copy link

JonRowe commented Jul 10, 2018

Ah my bad, totally didn't, yep 3.0.4 works, just 3.5 and 3.6 don't now.

@Serhansolo
Copy link

@Vages, sorry for the delayed reply. I just solved the isseu by downgrading my less for the project to 2.7.3 😏

@haydar-can
Copy link

haydar-can commented Jul 20, 2018

compatibility new less;

filename : label.variables

133.line

//@ribbonOffset: "calc("-@ribbonMargin" - "@ribbonTriangleSize~")";
@ribbonOffset: e("calc(-@{ribbonMargin} - @{ribbonTriangleSize})");

143.line
//@ribbonImageOffset: "calc("-@ribbonImageMargin" - "@ribbonTriangleSize~")";
@ribbonImageOffset: e("calc(-@{ribbonImageMargin} - @{ribbonTriangleSize})");

150.line
//@ribbonTableOffset: "calc("-@ribbonTableMargin" - "@ribbonTriangleSize~")";
@ribbonTableOffset: e("calc(-@{ribbonTableMargin} - @{ribbonTriangleSize})");

filename:segment.variables

91.line
//@attachedWidth: "calc(100% + "-@attachedHorizontalOffset * 2")";
@attachedWidth: e(%("calc(100% + %S%S",-@attachedHorizontalOffset * 2,")"));

filename:step.variables

98.line

//@attachedWidth: "calc(100% + "-@attachedHorizontalOffset * 2")";
@attachedWidth: e(%("calc(100% + %S%S", -@attachedHorizontalOffset * 2,")"));

filename:menu.variables

433.line

//@attachedWidth: "calc(100% + "-@attachedHorizontalOffset * 2")";
@attachedWidth: e(%("calc(100% + ",-@attachedHorizontalOffset * 2,")"));

@jlukic
Copy link
Member

jlukic commented Oct 13, 2018

This will be fixed in patch today with Semantic-Org/Semantic-UI#6512

@jlukic jlukic closed this as completed Oct 13, 2018
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

Successfully merging a pull request may close this issue.