Vue-cli 安装后运行出现问题
发布于 3 年前 作者 feer 2160 次浏览 来自 问答
粉丝福利 : 关注VUE中文社区公众号,回复视频领取粉丝福利

QQ%E6%88%AA%E5%9B%BE20190818200219

出现下面报错

$ vue-cli-service serve --mode development --dashboard

INFO Starting development server…

Starting type checking and linting service…

0% compilingUsing 1 worker with 2048MB memory limit

90% chunk assets processing ERROR Failed to compile with 2 errors8:13:19 PM

WARN
Couldn’t parse bundle asset “D:\vue\test3\dist\about.js”.
Analyzer will use module sizes from stats file.

error in ./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less&

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

Class constructor FileManager cannot be invoked without ‘new’
in undefined (line undefined, column undefined)

@ ./node_modules/vue-style-loader??ref–10-oneOf-1-0!./node_modules/css-loader??ref–10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref–10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref–10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less& 4:14-465 14:3-18:5 15:22-473
@ ./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less&
@ ./src/components/HelloWorld.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref–13-0!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref–13-2!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Home.vue?vue&type=script&lang=ts&
@ ./src/views/Home.vue?vue&type=script&lang=ts&
@ ./src/views/Home.vue
@ ./src/router.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://192.168.1.103:17676/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

error in ./src/App.vue?vue&type=style&index=0&lang=less&

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

Class constructor FileManager cannot be invoked without ‘new’
in undefined (line undefined, column undefined)

@ ./node_modules/vue-style-loader??ref–10-oneOf-1-0!./node_modules/css-loader??ref–10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref–10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref–10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&lang=less& 4:14-416 14:3-18:5 15:22-424
@ ./src/App.vue?vue&type=style&index=0&lang=less&
@ ./src/App.vue
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://192.168.1.103:17676/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

No type errors found
No lint errors found
Version: typescript 3.5.3, tslint 5.18.0
Time: 11049ms

Total task duration: 71.28s
$ vue-cli-service serve --mode development --dashboard
INFO Starting development server…

Starting type checking and linting service…

0% compilingUsing 1 worker with 2048MB memory limit

ERROR Failed to compile with 2 errors8:14:30 PM

error in ./src/App.vue?vue&type=style&index=0&lang=less&

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

Class constructor FileManager cannot be invoked without ‘new’
in undefined (line undefined, column undefined)

@ ./node_modules/vue-style-loader??ref–10-oneOf-1-0!./node_modules/css-loader??ref–10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref–10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref–10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/App.vue?vue&type=style&index=0&lang=less& 4:14-416 14:3-18:5 15:22-424
@ ./src/App.vue?vue&type=style&index=0&lang=less&
@ ./src/App.vue
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://192.168.1.103:25719/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

error in ./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less&

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

Class constructor FileManager cannot be invoked without ‘new’
in undefined (line undefined, column undefined)

@ ./node_modules/vue-style-loader??ref–10-oneOf-1-0!./node_modules/css-loader??ref–10-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/src??ref–10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref–10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less& 4:14-465 14:3-18:5 15:22-473
@ ./src/components/HelloWorld.vue?vue&type=style&index=0&id=469af010&scoped=true&lang=less&
@ ./src/components/HelloWorld.vue
@ ./node_modules/cache-loader/dist/cjs.js??ref–13-0!./node_modules/babel-loader/lib!./node_modules/ts-loader??ref–13-2!./node_modules/cache-loader/dist/cjs.js??ref–0-0!./node_modules/vue-loader/lib??vue-loader-options!./src/views/Home.vue?vue&type=script&lang=ts&
@ ./src/views/Home.vue?vue&type=script&lang=ts&
@ ./src/views/Home.vue
@ ./src/router.ts
@ ./src/main.ts
@ multi (webpack)-dev-server/client?http://192.168.1.103:25719/sockjs-node (webpack)/hot/dev-server.js ./src/main.ts

Type checking and linting in progress…

WARN
Couldn’t parse bundle asset “D:\vue\test3\dist\about.js”.
Analyzer will use module sizes from stats file.

No type errors found

No lint errors found

Version: typescript 3.5.3, tslint 5.18.0
Time: 7312ms

这种报错是我什么东西没安装吗??我创建项目后,直接运行,出的错

回到顶部