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

Upgrade to less version 2 #77

Closed
larsthorup opened this issue Nov 28, 2014 · 11 comments
Closed

Upgrade to less version 2 #77

larsthorup opened this issue Nov 28, 2014 · 11 comments

Comments

@larsthorup
Copy link

When upgrading less to the latest version 2, I get this error when running r.js:

Error: TypeError: Cannot read property 'contents' of undefined
at Object.Parser.parse (C:\r\larsthorup\jsdevenv-require\node_modules\less\lib\less\parser\parser.js:109:20)

This seems to be related to this issue: less/less.js#2278.

What are the plans for updating require-less to support less version 2?

@guybedford
Copy link
Owner

I just tried this actually myself. The reason is that less now uses the render function only, but it doesn't seem to trace the imports by default anymore unfortunately.

Instead of using the parser or renderer it seems we need to somehow directly call an API to load LESS files dynamically. Happy to update if anyone can work out what this is!

@purtuga
Copy link

purtuga commented Dec 26, 2014

I also hit this problem... I had followed the instructions found here on the README file, which indicate to run npm install less csso... To fix it, I removed the node_modules/less folder and re-installed using the following command instead: npm install less@^1.0.0
This installed version 1.7.5 which seems to get around the error above.

@crazyjat
Copy link

Why does nothing work? I'm having the same issue. I don't want to have to install any node modules at all if I can help it. Why can't I just use the less.js file to compile? Why is the documentation on optimizing with r.js so incomplete?

@gaperton
Copy link

npm install less@^1.7.5 works. 1.0.0 - doesn't

@crazyjat
Copy link

crazyjat commented Sep 1, 2015

I need less > 2.2.0 for svg-gradient support. Would love for someone to update this project to properly support the newest version.

@gamtiq
Copy link

gamtiq commented Mar 19, 2016

In https://github.com/gamtiq/require-less I updated less up to 2.5.x.
See also #67

@murrayju
Copy link
Collaborator

murrayju commented Jun 9, 2016

This seems to be critical for working in nodejs v6. Less 1.x depends on some old version of graceful-fs that is totally broken in node 6, and causes my r.js build to fail.

@guybedford Do you still maintain this? Do you plan to upgrade to less v2?

@gamtiq I tried your fork and got different errors... Have you tried yours with r.js builder on node 6?

@guybedford
Copy link
Owner

@murrayju yes this project is no longer maintained. If anyone would like to work on the update let me know.

@purtuga
Copy link

purtuga commented Jun 9, 2016

FYI: I tried @GerHobbelt fork and although it worked in the browser, it generated errors when used with r.js (build under node - 0.12 I think)

@gamtiq
Copy link

gamtiq commented Jun 10, 2016

@murrayju I did not try my fork with r.js nor with node 6.

@Obooman
Copy link
Collaborator

Obooman commented Mar 13, 2020

npm install @bracken/[email protected]

@Obooman Obooman closed this as completed Mar 13, 2020
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

8 participants