简体   繁体   English

如何从拥有的Github存储库发布npm软件包?

[英]How to publish a npm package from a owned Github repository?

Im'trying to publish a npm package from a owned Github repository. 我正在尝试从拥有的Github存储库发布npm软件包。 I've tried with: 我尝试过:

npm publish git+https://Aminta@github.com/Aminta/fontfacegen.git

But it gives the following error: 但是它给出了以下错误:

     Darwin 17.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build"
npm ERR! node v6.11.2
npm ERR! npm  v3.10.10
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fontfacegen@0.3.1-b build: `babel src --out-dir lib`
npm ERR! spawn ENOENT
npm ERR! 
npm ERR! Failed at the fontfacegen@0.3.1-b build script 'babel src --out-dir lib'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the fontfacegen package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel src --out-dir lib
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs fontfacegen
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls fontfacegen
npm ERR! There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! Please include the following file with any support request:

[etc] [等等]

Any hints? 有什么提示吗? Thanks! 谢谢!

You could publish from your local github directory. 您可以从本地github目录发布。 Just clone your repo and do npm publish from that directory. 只需克隆您的存储库,然后从该目录进行npm publish

Here's what npm says: 这是npm所说的:

npm publish [<tarball>|<folder>] [--tag <tag>] [--access <public|restricted>]

Publishes '.' if no argument supplied

Sets tag `latest` if no --tag specified

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM