Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

Yarn dependency warning


Hi,

I'm testing Laravel starter kit v8.1.8.
On Yarn cmd, I get the following warning

warning package.json: "dependencies" has dependency "axios" with range "^0.21.1" that collides with a dependency in "devDependencies" of the same name with version "^1.1.3"
warning "dependencies" has dependency "axios" with range "^0.21.1" that collides with a dependency in "devDependencies" of the same name with version "^1.1.3"
warning "dependencies" has dependency "axios" with range "^0.21.1" that collides with a dependency in "devDependencies" of the same name with version "^1.1.3"
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
warning "dependencies" has dependency "axios" with range "^0.21.1" that collides with a dependency in "devDependencies" of the same name with version "^1.1.3"

Why is that and how can it be fixed ?

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (1)


Hi,

The warning you received indicates that there is a duplicate package for "axios" in both the "dependencies" and "devDependencies" sections of the package.json file, with different versions.

As a workaround, you can remove "axios": "^0.24.0" from the "devDependencies" section.

To clear the warning about the package-lock.json file, you can simply remove the package-lock.json file and use Yarn to reinstall the dependencies.

We will also include a fix for the duplicate "axios" package issue in the next update of the Laravel starter kit.

Thanks


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(