我注册了 Github 私有 npm 注册表测试版并按照他们的说明进行操作:https : //github.com/features/package-registry
使用 npm 效果很好,但我更喜欢使用纱线。虽然 npm 找到注册的包没有问题,但 yarn 根本找不到它。
yarn add @omniphx/adminite-adminite-ui-components 输出:
yarn add v1.19.0
info No lockfile found.
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
[1/4] Resolving packages...
error Couldn't find package "@omniphx/adminite-ui-components" on the "npm" registry.
info Visit https://yarnpkg.com/en/docs/cli/add …Run Code Online (Sandbox Code Playgroud)