运行旧 Node 项目的悲剧

我已经很久没有在这个网站上写过任何东西了。我使用的框架是 盖茨比 这是 2020 年创建漂亮博客并快速运行的热门方法之一。这个东西有超过 41 个依赖项,天知道还有多少子依赖项,简直就是一个野兽。 近四年没有碰过它之后,是时候运行它了。 实际上很难。 npm install Failure could not find python2… 什么?为什么需要 python2 来安装节点包。它在做什么?我有python2吗?这个旧的可能有问题 node_modules 文件夹。让我删除它。 rm -rf node_modules/ npm install … Failure could not find python2 好吧,你赢了。我会安装 python2,尽管这很荒谬。 …… 30 分钟后,在摆弄使用 pyenv 安装 python2 后,希望不会破坏我的 python3 设置,我终于得到了 python2。 npm install … npm remove_cv_t’ is not a member of ‘std’; […]