问答详情
源自:-

HBuilderX less引入后编译报错

Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):

16:49:45.899 ModuleBuildError: Module build failed (from ./node_modules/less-loader/dist/cjs.js):

16:49:45.905 Class constructor FileManager cannot be invoked without 'new'

16:49:45.911       in undefined (line undefined, column undefined)

16:49:45.912     at runLoaders (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/webpack/lib/NormalModule.js:301:20)

16:49:45.924     at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/loader-runner/lib/LoaderRunner.js:367:11

16:49:45.927     at /Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/loader-runner/lib/LoaderRunner.js:233:18

16:49:45.938     at context.callback (/Applications/HBuilderX.app/Contents/HBuilderX/plugins/uniapp-cli/node_modules/loader-runner/lib/LoaderRunner.js:111:13)

16:49:45.939     at <anonymous>

16:49:45.955     at runMicrotasksCallback (internal/process/next_tick.js:121:5)

16:49:45.972     at _combinedTickCallback (internal/process/next_tick.js:131:7)

16:49:45.972     at process._tickCallback (internal/process/next_tick.js:180:9)

16:49:46.008  ERROR  Build failed with errors.


提问者:sh7217543 2019-08-17 16:53

个回答

  • 神思者
    2019-08-18 14:03:18

    删掉项目,重新创建一个项目再试试