我全局安装了rollup:
npm install -g rollup然后,我尝试在本地安装一个插件:
C:\wwwroot\speech-to-text [master +9 ~0 -0 !]> npm install rollup-plugin-json
npm WARN rollup-plugin-babel@4.0.3 requires a peer of rollup@>=0.60.0 <1 but none is installed. You must install peer dependencies yourself.
npm WARN rollup-plugin-commonjs@9.1.8 requires a peer of rollup@>=0.56.0 but none is installed. You must install peer dependencies yourself.
npm WARN speech-to-text@1.0.0 No repository field.
+ rollup-plugin-json@3.1.0
updated 1 package in 1.895s它会给出未安装rollup的警告。有人知道为什么吗?这是我检查的版本,如果你怀疑rollup是否真的安装了:
C:\wwwroot\speech-to-text [master +9 ~0 -0 !]> rollup -v
rollup v0.66.2发布于 2019-05-05 23:02:51
我认为问题在于您已经在全局环境中安装了rollup。
您可以尝试这样安装rollup
npm install rollup --save-dev发布于 2018-09-28 19:06:06
这些插件(rollup-plugin-commonjs和rollup-plugin-babel)将rollup列为其对等依赖项:
目前不会在全局包中搜索对等依赖项。我不确定它背后的原因是什么。另请参阅:
https://stackoverflow.com/questions/52462272
复制相似问题