【问题标题】:Why my "node-package" doesn't appear in my node_modules folder?为什么我的“节点包”没有出现在我的 node_modules 文件夹中?
【发布时间】:2018-07-04 05:39:58
【问题描述】:

我在 package.json 文件中添加了这个:

"models-package": "git+https://<token_key>:x-oauth-basic@github.com/<username>/models-package.git"

当我运行npm install 时,它会说:

npm ERR! code ELOCKVERIFY
npm ERR! Errors were found in your package-lock.json, run  npm install  to fix them.
npm ERR!     Missing: models-package@git+https://<token_key>:x-oauth-basic@github.com/<username>/models-package.git

npm ERR! A complete log of this run can be found in:
npm ERR!     <path>

我不知道为什么我的自定义models-package 没有设置在我的node_modules 文件夹中。这里有什么问题?

【问题讨论】:

    标签: node.js github package


    【解决方案1】:

    可能是因为你没有通过命令行添加这个包。 试试:

    npm install --save git+https://<token_key>:x-oauth-basic@github.com/<username>/models-package.git
    

    【讨论】:

    • 谢谢,我在package.json 文件中写入了错误的键属性。
    猜你喜欢
    • 1970-01-01
    • 2019-04-29
    • 2017-04-20
    • 2016-09-13
    • 2022-10-19
    • 1970-01-01
    • 2017-11-29
    • 2011-10-09
    • 2020-07-25
    相关资源
    最近更新 更多