首页 > 解决方案 > 为什么我的“节点包”没有出现在我的 node_modules 文件夹中?

问题描述

我在我的 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.jsgithubpackage

解决方案


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

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

推荐阅读