我正在使用lerna
命令使用lerna publish
在开放源代码存储库Web User Interface Framework, branch FM-423-lerna中自动发布作用域包。此命令可以很好地构建所有软件包,但是会失败,并显示以下消息:
lerna http fetch PUT 404 https://registry.npmjs.org/@anviltech%2fwuf-web-message 393ms
lerna ERR! E404 Not found
请注意,似乎软件包名称的slash
已替换为%2f
,从而导致URL错误。
我还创建了一个lerna issue
WUF是一个开源项目。克隆它,导航到其根文件夹,然后执行以下命令以观察失败:
$ lerna publish from-package --yes --content ./dist
其他lerna
命令,例如lerna changed
会正确产生软件包名称:
$ lerna changed
info cli using local version of lerna
lerna notice cli v3.13.1
lerna info versioning independent
lerna info Looking for changed packages since v2.0.0-rc.14
@anviltech/wuf-web-assets
@anviltech/wuf-web-code-sample
@anviltech/wuf-web-message
@anviltech/wuf-ang-configuration
@anviltech/wuf-ang-dashboard
@anviltech/wuf-ang-drawer
@anviltech/wuf-ang-gridster
@anviltech/wuf-ang-layout
@anviltech/wuf-ang-login-animated
@anviltech/wuf-ang-navigation
@anviltech/wuf-ang-smart-table
@anviltech/wuf-ang-utils
lerna success found 12 packages ready to publish
其他lerna
和yarn
命令(包括yarn publish
)也是如此。
注意:我尝试了bolt,并观察到了相同的行为!
lerna
不会因范围包名称更改而失败
observed
的行为是lerna
无法发布软件包:
$ lerna publish from-package --ignore-scripts --yes —skip-git
info cli using local version of lerna
lerna notice cli v3.13.1
lerna info versioning independent
Found 11 packages to publish:
- @anviltech/wuf-web-assets => 2.0.0-rc.18.1
- @anviltech/wuf-web-code-sample => 2.0.0-rc.1.1
- @anviltech/wuf-web-message => 2.0.0-rc.2.1
- @anviltech/wuf-ang-dashboard => 2.0.0-rc.2.1
- @anviltech/wuf-ang-drawer => 2.0.0-rc.3.1
- @anviltech/wuf-ang-gridster => 2.0.0-rc.1.1
- @anviltech/wuf-ang-layout => 2.0.0-rc.9.1
- @anviltech/wuf-ang-login-animated => 2.0.0-rc.3.1
- @anviltech/wuf-ang-navigation => 2.0.0-rc.8.1
- @anviltech/wuf-ang-smart-table => 2.0.0-rc.3.1
- @anviltech/wuf-ang-utils => 2.0.0-rc.1.1
lerna info auto-confirmed
lerna info publish Publishing packages to npm...
lerna info Verifying npm credentials
lerna http fetch GET 200 https://registry.npmjs.org/-/npm/v1/user 105ms
lerna http fetch GET 200 https://registry.npmjs.org/-/org/rodrigo.silveira/package?format=cli 98ms
lerna info lifecycle @anviltech/wuf-web-assets@2.0.0-rc.18.1~prepublish: @anviltech/wuf-web-assets@2.0.0-rc.18.1
lerna info lifecycle @anviltech/wuf-web-code-sample@2.0.0-rc.1.1~prepublish: @anviltech/wuf-web-code-sample@2.0.0-rc.1.1
lerna info lifecycle @anviltech/wuf-web-message@2.0.0-rc.2.1~prepublish: @anviltech/wuf-web-message@2.0.0-rc.2.1
lerna info lifecycle @anviltech/wuf-ang-dashboard@2.0.0-rc.2.1~prepublish: @anviltech/wuf-ang-dashboard@2.0.0-rc.2.1
lerna info lifecycle @anviltech/wuf-ang-drawer@2.0.0-rc.3.1~prepublish: @anviltech/wuf-ang-drawer@2.0.0-rc.3.1
lerna info lifecycle @anviltech/wuf-ang-gridster@2.0.0-rc.1.1~prepublish: @anviltech/wuf-ang-gridster@2.0.0-rc.1.1
lerna info lifecycle @anviltech/wuf-ang-navigation@2.0.0-rc.8.1~prepublish: @anviltech/wuf-ang-navigation@2.0.0-rc.8.1
lerna info lifecycle @anviltech/wuf-ang-utils@2.0.0-rc.1.1~prepublish: @anviltech/wuf-ang-utils@2.0.0-rc.1.1
> @anviltech/wuf-web-assets@2.0.0-rc.18.1 prepublish /Users/rodrigosilveira/projects/wuf/packages/wuf-web-assets
> yarn dist:prep && yarn dist:src && yarn dist:pkg
yarn run v1.15.2
$ rm -rf ./dist && mkdir ./dist
✨ Done in 0.13s.
yarn run v1.15.2
$ cp -r ./assets ./dist
✨ Done in 0.12s.
yarn run v1.15.2
$ cp package.json ./dist
✨ Done in 0.15s.
> @anviltech/wuf-web-code-sample@2.0.0-rc.1.1 prepublish /Users/rodrigosilveira/projects/wuf/packages/wuf-web-code-sample
> yarn packagr && cp package.json ./dist
yarn run v1.15.2
$ yarn build
$ webpack
ts-loader: Using typescript@3.2.4 and /Users/rodrigosilveira/projects/wuf/packages/wuf-web-code-sample/tsconfig.json
Hash: 486160bb3bc2f19d293a
Version: webpack 3.12.0
Time: 3134ms
Asset Size Chunks Chunk Names
wuf-code-sample.js 1.05 MB 0 [emitted] [big] main
wuf-code-sample.d.ts 1.23 kB [emitted]
[2] ./src/wuf-code-sample.ts 7.48 kB {0} [built]
[4] ./src/wuf-code-sample.scss 318 bytes {0} [built]
[5] /Users/rodrigosilveira/projects/wuf/node_modules/css-loader!/Users/rodrigosilveira/projects/wuf/node_modules/sass-loader/lib/loader.js??ref--2-2!./src/wuf-code-sample.scss 892 bytes {0} [built]
+ 191 hidden modules
✨ Done in 4.70s.
... many other packages built
lerna http fetch PUT 404 https://registry.npmjs.org/@anviltech%2fwuf-web-message 393ms
lerna ERR! E404 Not found
答案 0 :(得分:0)
我找到并解决了问题。令人尴尬的是,我不是组织成员!我希望错误消息更清晰。