Docz: [v rc.7]dependencies warning in yarn install

Created on 4 Apr 2019  路  5Comments  路  Source: doczjs/docz

Question

Description
Give more information about your doubt

I was updated with yarn add docz@next and package.json like this:

    "docz": "^1.0.0-rc.7",
    "docz-plugin-css": "^0.11.0",
    "docz-theme-default": "^1.0.0-rc.7",

but when I try yarn install, there will be a warning:

warning Lockfile has incorrect entry for "[email protected]+2bae93b5". Ignoring it.
Couldn't find any versions for "docz" that matches "1.0.0-rc.21+2bae93b5"
? Please choose a version of "docz" from this list: (Use arrow keys)

when I run yarn install each time, I have to select the version, is there any way to solve this?

Most helpful comment

As a temporary workaround you can use the resolutions field in your package.json to tell yarn/npm to ignore the requested version and only use a particular version.

see below for an example

{
  "name": "your-package-name",
  "resolutions": {
    "**/docz-core": "1.0.0-rc.7",
    "**/docz": "1.0.0-rc.7"
  },

This beahviour files is documented at the following link

https://yarnpkg.com/lang/en/docs/selective-version-resolutions/

All 5 comments

As a temporary workaround you can use the resolutions field in your package.json to tell yarn/npm to ignore the requested version and only use a particular version.

see below for an example

{
  "name": "your-package-name",
  "resolutions": {
    "**/docz-core": "1.0.0-rc.7",
    "**/docz": "1.0.0-rc.7"
  },

This beahviour files is documented at the following link

https://yarnpkg.com/lang/en/docs/selective-version-resolutions/

Thanks! this option helps me a lot!

Can I close this @GFwer ?

This is happening just with npm, it's a problem related to the way of npm resolve dependencies. Another solution keeps your docz dependencies like that:

"devDependencies": {
  "docz": "1.0.0-rc.7",
  "docz-core": "1.0.0-rc.7",
  "docz-theme-default": "1.0.0-rc.7",
},

Yes, thanks a lot!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

YardWill picture YardWill  路  3Comments

mquandalle picture mquandalle  路  3Comments

fenbka picture fenbka  路  3Comments

hayk94 picture hayk94  路  3Comments

w0wka91 picture w0wka91  路  3Comments