![](/img/trans.png)
[英]How to publish yarn workspace with root package.json dependencies?
[英]Dependencies on scoped package vs yarn
我已经创建了包含内容的作用域包@scope/eslint-config
{
"name": "@scope/eslint-config",
"version": "1.0.3",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-eslint": "8.2.5",
"eslint": "5.1.0",
"eslint-config-airbnb": "17.0.0",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-css-modules": "2.7.5",
"eslint-plugin-flowtype": "2.50.0",
"eslint-plugin-import": "2.13.0",
"eslint-plugin-jsx-a11y": "6.1.0",
"eslint-plugin-prettier": "2.6.2",
"eslint-plugin-react": "7.10.0",
"eslint-plugin-require-jsdoc-except": "1.1.0"
}
}
并在我的项目中将其添加为"@scoped/eslint-config": "1.0.2",
但是,在运行yarn install
我只能看到该软件包,而没有任何依赖性。 但是它可以与npm一起使用
我已经尝试过yarn
v1.8.0
, v1.7.0
和v1.6.0
你遇到麻烦了吗? 有什么办法吗?
在npm中,由于使用flattern结构,因此可以工作。
对于纱线,您需要说- --flat
但这会带来其他麻烦
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.