【发布时间】:2021-10-29 13:10:15
【问题描述】:
我有一个使用 Create-React-App 创建的非常简单的 React 应用程序。当我运行npm start 时,它会按预期执行react-scripts start。但是,我必须等待近 10 分钟才能启动开发服务器。 npm run build 也需要将近 10 分钟。即使只是简单地运行npm -version 也需要 10-20 秒才能获得输出。
我的机器上安装了最新版本的 npm(当前为 7.21.1)。
我在 Windows 10(64 位)上在 powershell 中运行命令(尽管在 git bash 中运行它们不会改变任何东西)。我有 32GB 的 RAM,并且没有运行许多其他程序。我不确定哪些额外信息会有所帮助,但我们将不胜感激。
【问题讨论】:
-
npm 是如何安装的?什么版本?安装位置是什么?
-
@YashKumarVerma npm 已全局安装(此 PC > OS(C:) > Program Files > nodejs > node_modules > npm)。 NPM v17.21.1,节点 v14.17.3。
标签: node.js reactjs windows npm