yarn workspaces info
列出了两个软件包,分别是react-simple-boilerplate
和website
,而yarn workspace react-simple-boilerplate build
则是unknown workspace "react-simple-boilerplate"
。
纱线版本1.22.4
节点版本14.4.0
root package.json
{
"private": true,
"workspaces": [
"react-simple-boilerplate",
"website"
],
"scripts": {
"lint": "yarn workspace react-simple-boilerplate lint",
"build": "concurrently 'yarn workspace react-simple-boilerplate build' 'yarn workspace website build'",
"dev:boilerplate": "yarn workspace react-simple-boilerplate dev",
"dev:website": "yarn workspace website dev"
},
"devDependencies": {
"concurrently": "^5.2.0"
}
}
react-simple-boilerplate package.json文件
{
"name": "react-simple-boilerplate",
"version": "1.0.0",
"description": "Simple react boilerplate with support for travis ci, webpack, sass etc.",
"main": "index.js",
"scripts": {
"build": "npm run build:css && webpack ---config ./config/webpack.prod.config.js",
"dev": "npm run watch:css && webpack-dev-server --config ./config/webpack.dev.config.js --open",
"lint": "./node_modules/.bin/eslint --ext .js,.jsx src/",
"lint:fix": "./node_modules/.bin/eslint --ext .js,.jsx src/ --fix",
"build:css": "postcss src/assets/css/styles.css -o src/assets/css/main.css",
"watch:css": "postcss src/assets/css/styles.css -o src/assets/css/main.css",
"test": "cross-env jest --collect-coverage --env=jsdom",
"test:watch": "jest --watch"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,jsx}": "./node_modules/.bin/eslint --ext .js,.jsx src/ && cross-env jest --collect-coverage --env=jsdom"
},
"keywords": [
"react",
"boilerplate",
"webpack",
"webpack hmr",
"travis",
"react-simple-boilerplate",
"react-boilerplate"
],
"author": "Uday Bhaskhar",
"license": "MIT",
"dependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@babel/preset-react": "^7.9.4",
"autoprefixer": "^9.7.6",
"babel-loader": "^8.1.0",
"postcss-cli": "^7.1.0",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"tailwindcss": "^1.3.4",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.11"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.5.0",
"@testing-library/react": "^10.0.2",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.2",
"css-loader": "^3.5.2",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^2.5.1",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.0.4",
"husky": "^4.2.5",
"identity-obj-proxy": "^3.0.0",
"jest": "^25.3.0",
"lint-staged": "^10.2.10",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.1",
"postcss-loader": "^3.0.0",
"sass-loader": "^8.0.2",
"style-loader": "^1.1.3",
"webpack-bundle-analyzer": "^3.6.1",
"webpack-dev-server": "^3.10.3"
}
}
网站package.json
{
"name": "website",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.29",
"@fortawesome/free-solid-svg-icons": "^5.13.1",
"@fortawesome/react-fontawesome": "^0.1.11",
"bootstrap": "^4.5.0",
"gray-matter": "^4.0.2",
"next": "9.4.4",
"react": "16.13.1",
"react-bootstrap": "^1.0.1",
"react-dom": "16.13.1",
"remark": "^12.0.0",
"remark-html": "^11.0.2"
}
}
答案 0 :(得分:0)
尝试将 yarn 版本降级到 1.18.0。