Skip to content

Update readme instructions for packages #37

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dobromir-hristov opened this issue Feb 7, 2021 · 5 comments
Closed

Update readme instructions for packages #37

dobromir-hristov opened this issue Feb 7, 2021 · 5 comments

Comments

@dobromir-hristov
Copy link

dobromir-hristov commented Feb 7, 2021

I think the Usage section in the readme should be updated.

image

With npm7, peerDependencies are being installed automatically, and having it like that, causes issues with installations. At Vuelidate we had this issue, until I actually went in, and copied what I saw from Vueuse. Basically removing the peerDeps altogether :D

I am not sure if that is the right thing to do though :/ Seems to work for Vueuse/core.

@antfu
Copy link
Member

antfu commented Feb 17, 2021

We have a few discussions (#7 #9 #15) about this and peerDependencies seem to be required by yarn2. What's the problem you are running into with npm v7?

@AMontagu
Copy link
Contributor

I had the same issue with npm 7.

FIX

"dependencies": {
  "vue-demi": "^0.6.2",
},
"peerDependencies": {
  "vue": "^2.6.0 || >=3.0.0-rc.0",
  "@vue/composition-api": "^1.0.0-rc.2"
},
"peerDependenciesMeta": {
  "@vue/composition-api": {
    "optional": true
  }
},
"devDependencies": {
  "vue": "^3.0.0"
},

Info on error

Docker image: circleci/node:latest
command: npm install

output:

#!/bin/bash -eo pipefail
npm install
[..................] - idealTree:project: sill idealTree buildDeps[[K..................] - idealTree:project: sill idealTree buildDeps[[K..................] - idealTree:project: sill idealTree buildDeps[[K..................] | idealTree:project: sill idealTree buildDepsnpm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   dev vue@"^3.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer vue@">= 2.5 < 3" from @vue/[email protected]
npm ERR! node_modules/@vue/composition-api
npm ERR!   peer @vue/composition-api@"^1.0.0-beta.12" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /home/circleci/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/circleci/.npm/_logs/2021-02-26T17_05_53_678Z-debug.log


Exited with code exit status 1
CircleCI received exit code 1

The circle ci file:

version: 2
jobs:
  test:
    docker:
      - image: circleci/node:latest
    steps:
      - checkout
      # TODO

  release:
    docker:
      - image: circleci/node:latest
    steps:
      - checkout
      - run: npm install
      - run: npm run build
      - run: npx semantic-release

workflows:
  version: 2
  test_and_release:
    # Run the test jobs first, then the release only when all the test jobs are successful
    jobs:
      - test
      - release:
          requires:
            - test

@antfu
Copy link
Member

antfu commented Feb 26, 2021

@AMontagu This looks good to me, would you like to send a quick PR for it? Thanks

"peerDependenciesMeta": {
  "@vue/composition-api": {
    "optional": true
  }
},

EDIT: Done. Thanks!

@antfu antfu closed this as completed in 559eec6 Feb 27, 2021
@AMontagu
Copy link
Contributor

Sorry for the late answer it was Friday night just wake up now.

Are you okay to add in the read me the line for vue in devDependencies ? (I can do it this time haha) To avoid having my other issue.

@antfu
Copy link
Member

antfu commented Feb 27, 2021

Alright, please go ahead. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants