quasarframework / quasar-cli

[DEPRECATED, <= 0.17) Quasar Framework - CLI
https://quasar.dev
MIT License
202 stars 50 forks source link

npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0 in Quasar #226

Closed Qoyyuum closed 5 years ago

Qoyyuum commented 5 years ago

Software version

OS: Fedora 27 4.18.19-100.fc27.x86_64 Node: v11.8.0 NPM: 6.8.0 Any other software related to your bug: N/A

What did you get as the error?

npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0

What were you expecting?

No npm ERR when listing globally installed npm packages.

What steps did you take, to get the error?

$ sudo npm install quasar-cli -g
npm WARN deprecated @babel/preset-stage-2@7.0.0-beta.54: πŸ‘‹ We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
npm WARN deprecated @babel/preset-stage-3@7.0.0-beta.54: πŸ‘‹ We've deprecated any official stage presets in favor of users explicitly opt-ing into the proposals they want to use versus any perceived convenience. You can also check https://github.com/babel/babel/issues/7770 for more information.
/usr/local/bin/quasar -> /usr/local/lib/node_modules/quasar-cli/bin/quasar
npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.7 (node_modules/quasar-cli/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ quasar-cli@0.17.23
added 1040 packages from 548 contributors in 198.838s

$ sudo npm install ajv ajv-keywords -g
+ ajv-keywords@3.4.0
+ ajv@6.9.2
added 7 packages from 4 contributors in 4.005s

$ sudo npm ls -g --depth=0
/usr/local/lib
β”œβ”€β”€ @gridsome/cli@0.0.7
β”œβ”€β”€ @vue/cli@3.4.1
β”œβ”€β”€ @vue/cli-init@3.4.1
β”œβ”€β”€ ajv@6.9.2
β”œβ”€β”€ ajv-keywords@3.4.0
β”œβ”€β”€ npm@6.8.0
└── quasar-cli@0.17.23

npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0
npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0
npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0
npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0

Even after uninstalling ajv and ajv-keywords, error still persists:

sudo npm ls -g --depth=0          
/usr/local/lib
β”œβ”€β”€ @gridsome/cli@0.0.7
β”œβ”€β”€ @vue/cli@3.4.1
β”œβ”€β”€ @vue/cli-init@3.4.1
β”œβ”€β”€ npm@6.8.0
└── quasar-cli@0.17.23

npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0
npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0
npm ERR! peer dep missing: ajv@^6.9.1, required by ajv-keywords@3.4.0

But running quasar commands like init still works fine.

arhamcode commented 5 years ago

same here on: OS : Ubuntu 19.04 Node : 12.1.0 NPM : 6.9.0

quasar-cli@0.17.24

rstoenescu commented 5 years ago

Add this to your package.json, and recommending you to use yarn instead of npm:

"resolutions": {
    "ajv": "6.8.1"
  }

Note 1: this has been taken care of in the starter kit for any new projects. Note 2: not Quasar's fault for this issue, but unfortunately this is how things stand with npm packages.

peppeschiavo commented 5 years ago

@rstoenescu I have got the same issue while trying to upgrde my project from Angular 6 to Angular 8. I tried what you suggest, but did not work,

yehee commented 5 years ago

@rstoenescu I have the same issue, and like mentioned above, the issue still persists even after doing what you suggested.

rstoenescu commented 5 years ago

@peppeschiavo Angular????

@alice-0-kim use yarn and it'll work. unless something changed upstream again..

yehee commented 5 years ago

@rstoenescu Unfortunately, doesn't work with yarn as well..

gschiavo commented 5 years ago

@peppeschiavo Angular????

@alice-0-kim use yarn and it'll work. unless something changed upstream again.. @rstoenescu yes, Angular

shekar24 commented 5 years ago

I had the same problem but, when I manually installed ajv it worked fine.. Try this: npm i ajv