此贴为【vue.js教程】第14节 单文件组件讨论区,可以在这里分享经验、交流问题。
- 发布:2019-09-10 12:31
- 更新:2023-09-10 17:10
- 阅读:4571
it_wjl - I'm a backend developer with Java
在vue/cli-plugin-eslint v7.20.0版本之后就引用了vue/multi-word-component-names规则,所以在编译的时候判定test组件multi-word错误,自定义组件名称应该由多单词组成。
参考文献:https://blog.csdn.net/u013078755/article/details/123581070?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522168598272116782427458056%2522%252C%2522scm%2522%253A%252220140713.130102334..%2522%257D&request_id=168598272116782427458056&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~all~top_positive~default-1-123581070-null-null.142^v88^control,239^v2^insert_chatgpt&utm_term=Component%20name%20test%20should%20always%20be%20multi-word%20&spm=1018.2226.3001.4187
跟着老师课程走到这里:通过Mac电脑启动 vue ui 可视化工具出现这种错误是什么原因?如何解决?
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module '@vue/cli-ui/server'
Require stack:
- /usr/local/lib/node_modules/@vue/cli/lib/ui.js
- /usr/local/lib/node_modules/@vue/cli/bin/vue.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)
at Function.Module._load (internal/modules/cjs/loader.js:862:27)
at Module.require (internal/modules/cjs/loader.js:1040:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (/usr/local/lib/node_modules/@vue/cli/lib/ui.js:2:32)
at Module._compile (internal/modules/cjs/loader.js:1151:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1040:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/usr/local/lib/node_modules/@vue/cli/lib/ui.js',
'/usr/local/lib/node_modules/@vue/cli/bin/vue.js'
]
}
按照视频的流程来操作,一切都好,但是我在template里面的h2标签添加一个red类,结果就一直报错,提示: 15:2 error Mixed spaces and tabs no-mixed-spaces-and-tabs , 请问如何关闭这个,我试了网上几个方法都无效。。。
按照操作执行安装的,怎么执行vue ui时报错,是什么原因啊
E:\vue学习\test>vue ui
E:\python3\soft\node-v8.11.4-win-x64\node_modules\@vue\cli\node_modules_ora@5.4.1@ora\index.js:401
} catch {
^
SyntaxError: Unexpected token {
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\python3\soft\node-v8.11.4-win-x64\node_modules\@vue\cli\nodemodules\@vue_cli-shared-utils@5.0.1@@vue\cli-shared-utils\lib\spinner.js:1:75)
1***@qq.com
是说,我一直对着视频找我test.vue哪里标点or花括号写错了,原来是拼写规则,谢谢
2023-09-05 17:17