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

3.11.0 version ,gulp-less not work #3470

Closed
bigmeow opened this issue Feb 10, 2020 · 7 comments
Closed

3.11.0 version ,gulp-less not work #3470

bigmeow opened this issue Feb 10, 2020 · 7 comments

Comments

@bigmeow
Copy link

bigmeow commented Feb 10, 2020

// installed gulp-less last version
require("gulp-less")
C:\project\com\JK724.XCX.WechatShopping\node_modules\accord\lib\adapter_base.js:105
        throw new Error("'tried to require: " + this.supportedEngines + "'.\nNone found. Make sure one has been installed!");
        ^

Error: 'tried to require: less'.
None found. Make sure one has been installed!
    at Less.Adapter (C:\project\com\JK724.XCX.WechatShopping\node_modules\accord\lib\adapter_base.js:105:15)
    at new Less (C:\project\com\JK724.XCX.WechatShopping\node_modules\accord\lib\adapters\less\2.x - 3.x.js:17:41)
    at Object.exports.load (C:\project\com\JK724.XCX.WechatShopping\node_modules\accord\lib\index.js:31:12)
    at Object.<anonymous> (C:\project\com\JK724.XCX.WechatShopping\node_modules\gulp-less\index.js:9:29)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)

in package.json of gulp-less:

    "less": "2.6.x || ^3.7.1",
@Dimitar-Goshev
Copy link

We are experiencing the same issue as of today:
"less": "^3.8.1"

@dgavril
Copy link

dgavril commented Feb 10, 2020

Also reproducible with grunt-contrib-less ("grunt-contrib-less": "2.0.0") which uses "less": "^3.0.4".

@bigmeow
Copy link
Author

bigmeow commented Feb 10, 2020

My current solution is to lock the less version number in the project's package.json file:

"less": "3.10.3"

@jmwolfe
Copy link

jmwolfe commented Feb 10, 2020

@bigmeow any idea why my CI build is still failing?

I run:

 call npm install --no-optional 

but it doesn't seem to be getting the right version even with package.json above.

@jmwolfe
Copy link

jmwolfe commented Feb 10, 2020

In case any one else has this issue, the problem was I was interpreting someone's comment on the gulp-less project as applying to grunt/bower.. however it was the package.json option for yarn (resolutions:).

This little trick worked for me to peg the dependent less version to 3.10.3:

https://stackoverflow.com/questions/52416312/npm-equivalent-of-yarn-resolutions

only thing is you have to get the right directory in your CI path so it can find npx. HTH.

@jmwolfe
Copy link

jmwolfe commented Feb 10, 2020

My current solution is to lock the less version number in the project's package.json file:

"less": "3.10.3"

this doesn't seem to work if less is a dependent package to an installed package, like gulp-less. See my post above about implementing a resolutions tag in package.json for npm.

@matthew-dean
Copy link
Member

Closing as duplicate of #3469

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

5 participants