less.js icon indicating copy to clipboard operation
less.js copied to clipboard

Class constructor FileManager cannot be invoked without 'new'.

Open micooz opened this issue 7 years ago • 64 comments

It seems that v3.10.0 breaks my build, webpack logs below:

ERROR in ./src/pages/score/components/current/no-join/index.less
Module build failed (from ./node_modules/[email protected]@mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/[email protected]@less-loader/dist/cjs.js):


Class constructor FileManager cannot be invoked without 'new'
      in undefined (line undefined, column undefined)
    at runLoaders (/home/admin/build/node_modules/[email protected]@webpack/lib/NormalModule.js:313:20)
    at /home/admin/build/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:367:11
    at /home/admin/build/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/admin/build/node_modules/[email protected]@loader-runner/lib/LoaderRunner.js:111:13)

Everything is ok when downgrade to v3.9.0, please investigate this issue and hope to fix it as soon as possible.

micooz avatar Aug 17 '19 04:08 micooz

I have the same problem,you mast change you 'package.json' => "less": "~3.9.0", limit version

xiaoningzihai avatar Aug 17 '19 05:08 xiaoningzihai

+1

10W8K avatar Aug 17 '19 05:08 10W8K

+1

AlwaysSkylll avatar Aug 17 '19 05:08 AlwaysSkylll

+1! 急 ~

lzf0402 avatar Aug 17 '19 05:08 lzf0402

+1

groveLqh avatar Aug 17 '19 06:08 groveLqh

same problem

yolo2013 avatar Aug 17 '19 06:08 yolo2013

+1 version less 3.9.0 less-loader 4.1.0

Doneitha avatar Aug 17 '19 06:08 Doneitha

可以把package.json中 less版本的 ^ 去掉 重新安装一下 v3.9.0 应该就可以解决问题 大家可以试一下
虽然 锁定了版本 但是由于 ^, 所以会下载3 一下的最新版本, 最新版本应该是有问题的。

Doneitha avatar Aug 17 '19 06:08 Doneitha

+1

lizux avatar Aug 17 '19 06:08 lizux

+1

wangmingquan avatar Aug 17 '19 06:08 wangmingquan

const shortname = new this.less.FileManager().extractUrlParts(filename).filename;

这个类似代码引起的?

AlwaysSkylll avatar Aug 17 '19 06:08 AlwaysSkylll

omg, i limited the version to 3.9.0,works.

Tindtily avatar Aug 17 '19 08:08 Tindtily

Same here. npm picks up this "minor" release automatically, and breaks all of my builds. :(

starzle avatar Aug 17 '19 08:08 starzle

+1

huxiaoqi567 avatar Aug 17 '19 08:08 huxiaoqi567

v3.10.0 same error

smackgg avatar Aug 17 '19 08:08 smackgg

+1

AlixWang avatar Aug 17 '19 08:08 AlixWang

hurry

doxiaodong avatar Aug 17 '19 08:08 doxiaodong

+1

simple7 avatar Aug 17 '19 09:08 simple7

just use [email protected] every thing will be ok

lixiaohulee avatar Aug 17 '19 09:08 lixiaohulee

@lixiaohulee unless you're not using less-loader and everything will not be ok

0x80 avatar Aug 17 '19 12:08 0x80