0

我正在尝试从拥有的 Github 存储库中发布 npm 包。我试过:

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

但它给出了以下错误:

     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]

有什么提示吗?谢谢!

4

1 回答 1

0

您可以从本地 github 目录发布。只需克隆您的存储库并npm publish从该目录执行。

这是 npm 所说的:

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

Publishes '.' if no argument supplied

Sets tag `latest` if no --tag specified
于 2019-02-09T21:58:01.220 回答