Dependency Error When Installing NPM Packages
See original GitHub issueHi, Sorry if this is the wrong place for this but I’m trying to get started with Vuelidate and Vue 3 however when I try to install the packages I get a dependency error related to composition-api:
$ npm install @vuelidate/core @vuelidate/validators
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: app@0.1.0
npm ERR! Found: vue@3.0.4
npm ERR! node_modules/vue
npm ERR! vue@"^3.0.0" from the root project
npm ERR! peer vue@"^2.0.0 || >=3.0.0-rc.0" from @vuelidate/core@2.0.0-alpha.8
npm ERR! node_modules/@vuelidate/core
npm ERR! @vuelidate/core@"*" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@">= 2.5 < 3" from @vue/composition-api@1.0.0-beta.22
npm ERR! node_modules/@vue/composition-api
npm ERR! peer @vue/composition-api@"^1.0.0-beta.1" from @vuelidate/core@2.0.0-alpha.8
npm ERR! node_modules/@vuelidate/core
npm ERR! @vuelidate/core@"*" from the root project
I think I might be doing something wrong here but can’t find anything related to my problem online. Here is my package.json from my project:
{
"name": "app",
"version": "0.1.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"@azure/msal-browser": "^2.7.0",
"axios": "^0.21.0",
"core-js": "^3.6.5",
"mitt": "^2.1.0",
"primeflex": "^2.0.0",
"primeicons": "^4.1.0",
"primevue": "^3.0.2",
"vue": "^3.0.0",
"vue-router": "^4.0.0-rc.5",
"vuex": "^4.0.0-rc.2"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-vue": "^7.0.0-0",
"node-sass": "^5.0.0",
"sass-loader": "^10.1.0"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/vue3-essential",
"eslint:recommended"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
I’m not sure what I’m missing here. Any help pointing me in the right direction is appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Unable to resolve dependency tree error when installing npm ...
Show activity on this post. Try two options to resolve this issue: Option 1: Delete folder node_modules folder and file package_lock.json after ...
Read more >NPM Dependency errors? Then You're doing it wrong. - Medium
You set up a new Node JS/Webpack project, installed all your dependencies with npm install and your app runs smoothly.
Read more >"Unable to resolve dependency tree" error during NPM install ...
Delete node_module folder and the package-lock.json file. · Run npm cache verify to verify and clean up your npm. · Run npm install...
Read more >Common errors | npm Docs
Broken npm installation · Random errors · No compatible version found · Permissions errors · Error: ENOENT, stat 'C:\Users\<user>\AppData\Roaming\npm' on Windows 7 ...
Read more >How to solve npm ERR! code 1 when running npm install
This cause of this error is that one of the dependencies you define in your package.json file fails to be installed properly on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Same problem.
I’ve discovered this issue only occurs with newer versions of npm.
It can be easily reproduced by swapping node versions via nvm, then creating an app using the default vue3 preset from the vue cli and attempting to install vuelidate.
LTS version of npm, this works fine
Latest version of NPM, vuelidate won’t install
Should be fixed now.