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

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

Closed
micooz opened this issue Aug 17, 2019 · 64 comments

Comments

@micooz
Copy link

@micooz micooz commented Aug 17, 2019

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.

@xiaoningzihai

This comment has been minimized.

Copy link

@xiaoningzihai xiaoningzihai commented Aug 17, 2019

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

@alexyan

This comment has been minimized.

Copy link

@alexyan alexyan commented Aug 17, 2019

+1

1 similar comment
@AlwaysSkylll

This comment has been minimized.

Copy link

@AlwaysSkylll AlwaysSkylll commented Aug 17, 2019

+1

@lzf0402

This comment has been minimized.

Copy link

@lzf0402 lzf0402 commented Aug 17, 2019

+1!
急 ~

@Liqihan

This comment has been minimized.

Copy link

@Liqihan Liqihan commented Aug 17, 2019

+1

@yolo2013

This comment has been minimized.

Copy link

@yolo2013 yolo2013 commented Aug 17, 2019

same problem

@Doneitha

This comment has been minimized.

Copy link

@Doneitha Doneitha commented Aug 17, 2019

+1 version less 3.9.0 less-loader 4.1.0

@Doneitha

This comment has been minimized.

Copy link

@Doneitha Doneitha commented Aug 17, 2019

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

@lizux

This comment has been minimized.

Copy link

@lizux lizux commented Aug 17, 2019

+1

1 similar comment
@wangmingquan

This comment has been minimized.

Copy link

@wangmingquan wangmingquan commented Aug 17, 2019

+1

@AlwaysSkylll

This comment has been minimized.

Copy link

@AlwaysSkylll AlwaysSkylll commented Aug 17, 2019

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

这个类似代码引起的?

@Tindtily

This comment has been minimized.

Copy link

@Tindtily Tindtily commented Aug 17, 2019

omg, i limited the version to 3.9.0,works.

@starzle

This comment has been minimized.

Copy link

@starzle starzle commented Aug 17, 2019

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

@huxiaoqi567

This comment has been minimized.

Copy link

@huxiaoqi567 huxiaoqi567 commented Aug 17, 2019

+1

@smackgg

This comment has been minimized.

Copy link

@smackgg smackgg commented Aug 17, 2019

v3.10.0 same error

@AlixWang

This comment has been minimized.

Copy link

@AlixWang AlixWang commented Aug 17, 2019

+1

@doxiaodong

This comment has been minimized.

Copy link

@doxiaodong doxiaodong commented Aug 17, 2019

hurry

@simple7

This comment has been minimized.

Copy link

@simple7 simple7 commented Aug 17, 2019

+1

@lixiaohulee

This comment has been minimized.

Copy link

@lixiaohulee lixiaohulee commented Aug 17, 2019

just use less-loader@5.0.0 every thing will be ok

@0x80

This comment has been minimized.

Copy link

@0x80 0x80 commented Aug 17, 2019

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

@wangningbo93

This comment has been minimized.

Copy link

@wangningbo93 wangningbo93 commented Aug 17, 2019

+1

afc163 added a commit to ant-design/ant-design that referenced this issue Aug 17, 2019
afc163 added a commit to ant-design/ant-design that referenced this issue Aug 17, 2019
* 🐛 Fix Cascader notFoundContent width

close #18176

* 🔒 lock less to 3.9.0

less/less.js#3416
less/less.js#3414
@asiareal

This comment has been minimized.

Copy link

@asiareal asiareal commented Aug 17, 2019

+1

@KatDenisenko

This comment has been minimized.

Copy link

@KatDenisenko KatDenisenko commented Aug 17, 2019

I have the same problem (((

@Lalitha-Iyer

This comment has been minimized.

Copy link

@Lalitha-Iyer Lalitha-Iyer commented Aug 17, 2019

+1

@kikeztw

This comment has been minimized.

Copy link

@kikeztw kikeztw commented Aug 17, 2019

i have the same problem :/

@matthew-dean

This comment has been minimized.

Copy link
Member

@matthew-dean matthew-dean commented Aug 18, 2019

This is an issue with an older version of less-loader, not Less, which did not inherit the Less filemanager correctly. less-loader 5.0 does. See: #3414 (comment)

@MustafinVadim

This comment has been minimized.

Copy link

@MustafinVadim MustafinVadim commented Aug 20, 2019

+1

1 similar comment
@resyin

This comment has been minimized.

Copy link

@resyin resyin commented Aug 20, 2019

+1

jsers added a commit to jsers/rc-tools that referenced this issue Aug 20, 2019
@lang1427

This comment has been minimized.

Copy link

@lang1427 lang1427 commented Aug 20, 2019

Manually specify less version :
npm i less@3.9.0 -D
ok!!!

wangyi7099 added a commit to wangyi7099/gatsby that referenced this issue Aug 20, 2019
@JunlinZhu-Tommy

This comment has been minimized.

Copy link

@JunlinZhu-Tommy JunlinZhu-Tommy commented Aug 20, 2019

Fix by downgrade to 3.9.0

@vipcxj

This comment has been minimized.

Copy link

@vipcxj vipcxj commented Aug 20, 2019

Just before, I delete the node_modules and type npm i, this error happen. So the latest version 3.10.1 still has this bug. I choose downgrade to 3.9.0

@ezgitek

This comment has been minimized.

Copy link

@ezgitek ezgitek commented Aug 20, 2019

How would I fix this bug if I am using @zeit/next-less? Any help appreciated.

@hua1995116

This comment has been minimized.

Copy link

@hua1995116 hua1995116 commented Aug 20, 2019

@ezgitek

npm i @zeit/next-less
npm i less@3.9.0
jleveugle added a commit to ovh/manager that referenced this issue Aug 20, 2019
With less@3.10+, our less files won't compile using less-loader.

Known issue: less/less.js#3414
@buerxixi

This comment has been minimized.

Copy link

@buerxixi buerxixi commented Aug 20, 2019

https://forum.vuejs.org/t/vue-cli/72008/7
"less": "^3.10.1",
"less-loader": "^5.0.0",
is running

@matthew-dean

This comment has been minimized.

Copy link
Member

@matthew-dean matthew-dean commented Aug 20, 2019

Merged: #3421

No one with less-loader v4 issues seemed willing to test [3.10.2] 🤷‍♂, but in my testing, Less-loader's v4 tests broke differently with 3.10.1 (class constructor issue), and broke the same with this PR. So..... not sure if it fixes it, but it should be no worse?

I merged that possible fix into master (but not yet released to NPM). Still would love for someone to confirm before releasing instead of the +1's.

@jenniferneale

This comment has been minimized.

Copy link

@jenniferneale jenniferneale commented Aug 20, 2019

I can confirm I just tried the current master branch of less locally with less-loader ^4.1.0, and my project is able to build again. 👍

@jenniferneale

This comment has been minimized.

Copy link

@jenniferneale jenniferneale commented Aug 20, 2019

Thanks for your work on this!

@matthew-dean

This comment has been minimized.

Copy link
Member

@matthew-dean matthew-dean commented Aug 20, 2019

@jenniferneale Thanks for confirming! I'll publish to NPM later today then, can't do it from work.

@pod4g

This comment has been minimized.

Copy link

@pod4g pod4g commented Aug 21, 2019

+1

mvollmer added a commit to mvollmer/subscription-manager that referenced this issue Aug 21, 2019
mvollmer added a commit to mvollmer/subscription-manager that referenced this issue Aug 22, 2019
@H4ngman

This comment has been minimized.

Copy link

@H4ngman H4ngman commented Aug 23, 2019

Is this issue fixed with 3.10.3?

@matthew-dean

This comment has been minimized.

Copy link
Member

@matthew-dean matthew-dean commented Aug 25, 2019

@H4ngman Should be. Re-open if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.