[5.0.0] pnpm error - Peer dependencies that should be installed
MartinX3 opened this issue · 6 comments
I'm using nuxt 2 with nuxt bridge, which can't use webpack 5.
Also in my case I can't use vite, because vuetify 2 doesn't support it without complex workarounds.
With 5.0.0 I get the following error in pnpm:
└─┬ @nuxtjs/stylelint-module 5.0.0
├─┬ vite-plugin-stylelint 4.2.0
│ └── ✕ missing peer vite@"^2.0.0 || ^3.0.0 || ^4.0.0"
└─┬ stylelint-webpack-plugin 4.1.0
└── ✕ unmet peer webpack@^5.0.0: found 4.46.0
Peer dependencies that should be installed:
vite@"^2.0.0 || ^3.0.0 || ^4.0.0"
Originally posted by @MartinX3 in #74 (comment)
Ho @MartinX3
Can share you configuration?
@ricardogobbosouza yes of course
{
"version": "1.0.0",
"private": true,
"packageManager": "pnpm@7.29.1",
"scripts": {
"build": "nuxi generate",
"dev": "nuxi dev",
"lint": "pnpm lint:markup && pnpm lint:js && pnpm lint:style && pnpm lint:prettier",
"lint:js": "eslint --ext \".js,.ts,.vue\" --ignore-path .gitignore --fix .",
"lint:markup": "vue-tsc",
"lint:prettier": "prettier --write --list-different .",
"lint:style": "stylelint \"**/*.{css,scss,sass,html,vue}\" --ignore-path .gitignore --fix",
"predev": "pnpm lint",
"preinstall": "npx only-allow pnpm",
"prepare": "husky install && nuxi prepare"
},
"dependencies": {
"@pinia/nuxt": "~0.4.7",
"@yeger/vue2-masonry-wall": "~2.3.3",
"date-holidays": "~3.18.0",
"nuxt": "~2.16.2",
"pinia": "~2.0.33",
"uuid": "~9.0.0",
"vue": "~2.7.14",
"vuetify": "~2.6.14"
},
"devDependencies": {
"@babel/core": "~7.21.0",
"@commitlint/cli": "~17.4.4",
"@commitlint/config-conventional": "~17.4.4",
"@mdi/js": "~7.1.96",
"@nuxt/bridge": "npm:@nuxt/bridge-edge@~3.0.0-27928371.c30fa0f",
"@nuxt/types": "~2.16.0",
"@nuxtjs/eslint-config-typescript": "~12.0.0",
"@nuxtjs/eslint-module": "~4.0.1",
"@nuxtjs/router": "~1.7.0",
"@nuxtjs/vuetify": "~1.12.3",
"@rushstack/eslint-patch": "~1.2.0",
"@types/mime-types": "~2.1.1",
"@types/node": "~18.15.0",
"@types/uuid": "~9.0.1",
"@vue/eslint-config-prettier": "~7.1.0",
"@vue/eslint-config-typescript": "~11.0.2",
"buffer": "~6.0.3",
"consola": "~2.15.3",
"eslint": "~8.35.0",
"eslint-plugin-nuxt": "~4.0.0",
"eslint-plugin-vue": "~9.9.0",
"eslint-plugin-vuetify": "~1.1.0",
"husky": "~8.0.3",
"lint-staged": "~13.1.2",
"postcss-html": "~1.5.0",
"prettier": "~2.8.4",
"stylelint": "~15.2.0",
"stylelint-config-recommended-vue": "~1.4.0",
"stylelint-config-standard": "~30.0.1",
"typescript": "~4.9.5",
"vue-tsc": "~1.2.0",
"webpack": "~4.46.0"
},
"gitHooks": {
"pre-commit": "lint-staged"
},
"lint-staged": {
"*.vue": "bash -c vue-tsc",
"*.{js,ts,vue}": "eslint --fix",
"*.{css,scss,sass,html,vue}": "stylelint --fix",
"*.**": "prettier --ignore-unknown --write"
}
}
@ricardogobbosouza with 4.2.1 I get the pnpm error
+ @nuxtjs/stylelint-module 4.2.1 (5.0.1 is available)
WARN Issues with peer dependencies found
.
└─┬ @nuxtjs/eslint-module 4.0.2
├─┬ vite-plugin-eslint 1.8.1
│ └── ✕ missing peer vite@>=2
└─┬ eslint-webpack-plugin 4.0.0
└── ✕ unmet peer webpack@^5.0.0: found 4.46.0
Peer dependencies that should be installed:
vite@>=2
nuxt 2 uses webpack 4. There is no support for webpack 5 by the nuxt devs.
nuxt 2 bridge also, since vite is optional there.
5.0.1 with nuxt bridge compatibility according to the changelog gives me:
WARN Issues with peer dependencies found
.
├─┬ @nuxtjs/eslint-module 4.0.2
│ ├─┬ vite-plugin-eslint 1.8.1
│ │ └── ✕ missing peer vite@>=2
│ └─┬ eslint-webpack-plugin 4.0.0
│ └── ✕ unmet peer webpack@^5.0.0: found 4.46.0
└─┬ @nuxtjs/stylelint-module 5.0.1
├─┬ vite-plugin-stylelint 4.3.0
│ └── ✕ missing peer vite@"^2.0.0 || ^3.0.0 || ^4.0.0"
└─┬ stylelint-webpack-plugin 4.1.0
└── ✕ unmet peer webpack@^5.0.0: found 4.46.0
Peer dependencies that should be installed:
vite@">=2.0.0 <3.0.0 || >=3.0.0 <4.0.0 || >=4.0.0 <5.0.0"
But 4.2.1 and 5.0.1 are fixing the runtime error with nuxt bridge reported earlier, thank you.
These are warnings and not errors.
When using webpack 4 you must use the nuxt2 branch
Ah thank you
I thought I should use v5 with nuxt bridge because of the changelog.
Especially since I also don't get an error at buildtime as well there.