【问题标题】:Can't install gatsby-source-tumblr无法安装 gatsby-source-tumblr
【发布时间】:2019-10-31 18:37:56
【问题描述】:

我在 www.gatsbyjs.org/packages/gatsby-source-tumblr/ 找到了 gatsby-source-tumblr,并决定试一试,因为我在 tumblr 上有图片,我想在我的 gatsby 网站上展示。

但是,它不会安装。

这是错误:

npm ERR! path C:\Users\christoffer.rydestah\Documents\Repos\napoli-cafe\node_modules\.bin\json5.cmd
npm ERR! code EEXIST
npm ERR! Refusing to delete C:\Users\christoffer.rydestah\Documents\Repos\napoli-cafe\node_modules\.bin\json5.cmd: ..\@babel\core\node_modules\json5\lib\cli.js symlink target is not controlled by npm C:\Users\christoffer.rydestah\Documents\Repos\napoli-cafe\node_modules\json5
npm ERR! File exists: C:\Users\christoffer.rydestah\Documents\Repos\napoli-cafe\node_modules\.bin\json5.cmdnpm ERR! Move it away, and try again.

npm ERR! A complete log of this run can be found in:npm ERR!     C:\Users\christoffer.rydestah\AppData\Roaming\npm-cache\_logs\2019-10-31T08_56_28_688Z-debug.logC:\Users\christoffer.rydestah\Documents\Repos\napoli-cafe>sudo npm install --save gatsby-source-tumblr
'sudo' is not recognized as an internal or external command,operable program or batch file.

有人遇到过这个插件的问题吗? 任何想法如何解决这个问题?

【问题讨论】:

  • 删除你的 node_modules 并运行 npm i 再次检查,不要使用 sudo 运行任何东西
  • @Pardeep 这个问题来自window
  • 我只看到 'sudo' 未被识别为内部或外部命令:P
  • @KingStone 是对的,这是窗口问题。尝试在我的 macbook 上安装该插件,并且成功了。

标签: node.js npm tumblr gatsby


【解决方案1】:

您需要安装 cygwin 之类的东西才能运行 bash 脚本。 但是cygwin也没有sudo命令,在这种情况下你可以为这个命令创建一些存根脚本cydwyn sudo

【讨论】:

  • 我安装了cygwin,但还是不行。无论如何,我在我的 macbook 上安装了插件并且它工作正常。感谢您的宝贵时间!
猜你喜欢
  • 1970-01-01
  • 2021-08-29
  • 1970-01-01
  • 2018-12-15
  • 2020-09-04
  • 2019-08-03
  • 1970-01-01
  • 2021-06-16
  • 2019-12-10
相关资源
最近更新 更多