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

Comments

Projects
None yet
@kohlikohl
Copy link

kohlikohl commented Oct 16, 2017

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

This comment has been minimized.

Copy link

davidpanzarella commented Mar 9, 2018

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

This comment has been minimized.

Copy link

rayronvictor commented Mar 12, 2018

Same problem in less 3.0.1

@dongcai

This comment has been minimized.

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

This comment has been minimized.

Copy link

josuevalrob commented May 8, 2018

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

This comment has been minimized.

Copy link

josuevalrob commented May 8, 2018

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

@atti187

This comment has been minimized.

Copy link

atti187 commented May 8, 2018

npm install less@2.7.3 --save-dev

@josuevalrob

This comment has been minimized.

Copy link

josuevalrob commented May 9, 2018

Sorry, other silly question... If i run:
npm install --global less@2.7.3 --save-dev
It shows me:

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

  • less@2.7.3
    updated 1 package in 2.756s

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 less@2.7.3 --save-dev and getting this:

  • less@2.7.3
    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 less@2.7.3 globally?

RetroCraft added a commit to RetroCraft/volunteeringpeel that referenced this issue May 13, 2018

@0paIescent

This comment has been minimized.

Copy link

0paIescent commented May 24, 2018

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

@0paIescent

This comment has been minimized.

Copy link

0paIescent commented May 24, 2018

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

@dragondraico

This comment has been minimized.

Copy link

dragondraico commented May 25, 2018

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

This comment has been minimized.

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

This comment has been minimized.

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

This comment has been minimized.

Copy link

Vages commented Jul 3, 2018

Time to close this now, @kohlikohl?

@Serhansolo

This comment has been minimized.

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

This comment has been minimized.

Copy link

Vages commented Jul 6, 2018

Remembered to change the import, @Serhansolo ?

@ThanosSiopoudis

This comment has been minimized.

Copy link

ThanosSiopoudis commented Jul 9, 2018

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

This comment has been minimized.

Copy link

JonRowe commented Jul 10, 2018

2.3.3 is also still broken on less 3.0.4 for me

@ThanosSiopoudis

This comment has been minimized.

Copy link

ThanosSiopoudis commented Jul 10, 2018

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

@JonRowe

This comment has been minimized.

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

This comment has been minimized.

Copy link

Serhansolo commented Jul 16, 2018

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

@ahbapAldirmaz

This comment has been minimized.

Copy link

ahbapAldirmaz 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

This comment has been minimized.

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 Oct 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment