Heim  >  Fragen und Antworten  >  Hauptteil

javascript – So installieren Sie Pakete automatisch basierend auf package.json

Was ich jetzt habe, ist ein Projekt ohne node_modules, aber mit package.json darin. Wie kann ich node_modules basierend auf dieser Datei wiederherstellen??

三叔三叔2670 Tage vor670

Antworte allen(3)Ich werde antworten

  • phpcn_u1582

    phpcn_u15822017-06-28 09:28:58

    Just Run This On Your Terminal

    npm install 

    Antwort
    0
  • PHP中文网

    PHP中文网2017-06-28 09:28:58

    npm install

    Antwort
    0
  • PHP中文网

    PHP中文网2017-06-28 09:28:58

    在你项目目录下打开命令行,执行npm install会自动生成node_modules文件。
    不过我现在一般用cnpm(淘宝镜像),安装速度快一些。
    如果你想要使用cnpm安装的话,先执行npm install -g cnpm --registry=https://registry.npm.taobao.org
    然后运行cnpm install

    Antwort
    0
  • StornierenAntwort