Skip to content

Class constructor FileManager cannot be invoked without 'new'. #3414

Closed
@micooz

Description

@micooz

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/_mini-css-extract-plugin@0.5.0@mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/_less-loader@4.1.0@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/_webpack@4.39.2@webpack/lib/NormalModule.js:313:20)
    at /home/admin/build/node_modules/_loader-runner@2.4.0@loader-runner/lib/LoaderRunner.js:367:11
    at /home/admin/build/node_modules/_loader-runner@2.4.0@loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/admin/build/node_modules/_loader-runner@2.4.0@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.

Activity

xiaoningzihai

xiaoningzihai commented on Aug 17, 2019

@xiaoningzihai

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

10W8K

10W8K commented on Aug 17, 2019

@10W8K

+1

AlwaysSkylll

AlwaysSkylll commented on Aug 17, 2019

@AlwaysSkylll

+1

lzf0402

lzf0402 commented on Aug 17, 2019

@lzf0402

+1!
急 ~

Liqihan

Liqihan commented on Aug 17, 2019

@Liqihan

+1

yolo2013

yolo2013 commented on Aug 17, 2019

@yolo2013

same problem

Doneitha

Doneitha commented on Aug 17, 2019

@Doneitha

+1 version less 3.9.0 less-loader 4.1.0

Doneitha

Doneitha commented on Aug 17, 2019

@Doneitha

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

lizux

lizux commented on Aug 17, 2019

@lizux

+1

wangmingquan

wangmingquan commented on Aug 17, 2019

@wangmingquan

+1

AlwaysSkylll

AlwaysSkylll commented on Aug 17, 2019

@AlwaysSkylll

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

这个类似代码引起的?

Tindtily

Tindtily commented on Aug 17, 2019

@Tindtily

omg, i limited the version to 3.9.0,works.

starzle

starzle commented on Aug 17, 2019

@starzle

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

huxiaoqi567

huxiaoqi567 commented on Aug 17, 2019

@huxiaoqi567

+1

86 remaining items

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @montanaflynn@10W8K@matthew-dean@0x80@lzf0402

        Issue actions

          Class constructor FileManager cannot be invoked without 'new'. · Issue #3414 · less/less.js