// 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",
We are experiencing the same issue as of today:
"less": "^3.8.1"
Also reproducible with grunt-contrib-less ("grunt-contrib-less": "2.0.0") which uses "less": "^3.0.4".
My current solution is to lock the less
version number in the project's package.json file:
"less": "3.10.3"
@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.
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.
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.
Closing as duplicate of https://github.com/less/less.js/issues/3469
Most helpful comment
My current solution is to lock the
less
version number in the project's package.json file: