[英]Unable to install vue-onsenui due to peer dependencies
I'm trying to install vue-onsenui using npm install vue-onsenui --save
in my project folder. 我正在尝试使用npm install vue-onsenui --save
在我的项目文件夹中npm install vue-onsenui --save
。 I get the following message but I don't know how to fix it. 我收到以下消息,但不知道如何解决。 I've tried npm install ansistyles
but that didn't work either. 我已经尝试过npm install ansistyles
但是那也不起作用。
npm install vue-onsenui --save
npm WARN vue-onsenui@2.4.3 requires a peer of vue@~2.5.0 but none is installed. You must install peer dependencies yourself.
npm WARN network.pack.app_user@1.0.0 No repository field.
npm ERR! path /Users/BenFransen/code/pack-app/node_modules/npm/node_modules/ansistyles
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/BenFransen/code/pack-app/node_modules/npm/node_modules/ansistyles' -> '/Users/BenFransen/code/pack-app/node_modules/npm/node_modules/.ansistyles.DELETE'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
The path in the error looks strange - have you added npm
as a dependency of your project? 错误中的路径看起来很奇怪-您是否已将npm
添加为项目的依赖项?
npm is generally installed globally and used via the command line - it's usually not needed as a dependency of your project unless you're programatically using npm in your project (is that the case?) npm通常在全局安装并通过命令行使用-通常不需要将其作为项目的依赖项,除非您在项目中以编程方式使用npm(是这种情况?)
Try removing the node_modules
directory (and possibly package-lock.json
) and rerunning npm install
in your project directory before adding vue-onsenui
again - sometimes resetting things like that can help. 在再次添加vue-onsenui
之前,尝试删除node_modules
目录(可能还有package-lock.json
)并在项目目录中重新运行npm install
vue-onsenui
有时重置类似的东西可能会有所帮助。
On a separate note, the peer dependencies warning is saying you need to have vue
as a dependency in your project in order to use vue-onsenui
, so make sure that is there as well. 另外,对等依赖项警告指出,要使用vue-onsenui
,您需要在项目中将vue
作为依赖vue-onsenui
,因此请确保也存在该依赖项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.