我试图从拥有的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:
[等]
任何提示?谢谢!
答案 0 :(得分: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