首页 > 解决方案 > Vuetify 安装问题(未找到这些依赖项:* Vuetify in ./src/main.js)

问题描述

我正在尝试安装和运行一个 Vue 项目。

首先我做了:

npm install

然后当我跑

npm run dev

我收到以下错误

ERROR  Failed to compile with 2 errors                                                                                                                                                                                            

These dependencies were not found:

* Vuetify in ./src/main.js
* vue-events in ./src/main.js

To install them, you can run: npm install --save Vuetify vue-events

当我运行时,npm install --save Vuetify vue-events我得到以下

npm ERR! Linux 4.15.0-55-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "--save" "Vuetify" "vue-events"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! code E404

npm ERR! 404 Not found : Vuetify
npm ERR! 404 
npm ERR! 404  'Vuetify' is not in the npm registry.
npm ERR! 404 Your package name is not valid, because 
npm ERR! 404  1. name can no longer contain capital letters
npm ERR! 404 
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

npm ERR! Please include the following file with any support request:

标签: vue.jsvuetify.js

解决方案


好的,我找到了,

我在 main.js 中将其更改为以下行

import Vuetify from 'Vuetify';

import Vuetify from 'vuetify';

推荐阅读