alxshelepenok/lumen

Dependency Error

Closed this issue · 3 comments

Describe the bug
Gatsby CLI (ver: 4.9.1) can't resolve dependency with some packages. The error is as follows:

gatsby new blog https://github.com/alxshelepenok/gatsby-starter-lumen
info Creating new site from git: https://github.com/alxshelepenok/gatsby-starter-lumen.git

Cloning into 'blog'...
remote: Enumerating objects: 340, done.
remote: Counting objects: 100% (340/340), done.
remote: Compressing objects: 100% (269/269), done.
remote: Total 340 (delta 45), reused 337 (delta 45), pack-reused 0
Receiving objects: 100% (340/340), 4.90 MiB | 553.00 KiB/s, done.
Resolving deltas: 100% (45/45), done.
←[2K←[1A←[2K←[G←[32msuccess←[39m Created starter directory layout

←[2K←[1A←[2K←[G←[34minfo←[39m Installing packages...

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: gatsby-starter-lumen@3.0.7
npm ERR! Found: react@17.0.2
npm ERR! node_modules/react
npm ERR!   react@"^17.0.2" from the root project
npm ERR!   peer react@"^16.4.2 || ^17.0.0" from gatsby-link@2.11.0
npm ERR!   node_modules/gatsby-link
npm ERR!     gatsby-link@"^2.11.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"15.x || 16.x || 16.4.0-alpha.0911da3" from @reach/router@1.3.4
npm ERR! node_modules/@reach/router
npm ERR!   peer @reach/router@"^1.3.3" from gatsby-link@2.11.0
npm ERR!   node_modules/gatsby-link
npm ERR!     gatsby-link@"^2.11.0" 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 C:\Users\RIFAT\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:

 ERROR

Command failed with exit code 1: npm install



  Error: Command failed with exit code 1: npm install

  - error.js:60 makeError
    [npm]/[gatsby-cli]/[execa]/lib/error.js:60:11

  - index.js:118 handlePromise
    [npm]/[gatsby-cli]/[execa]/index.js:118:26

  - task_queues:96 processTicksAndRejections
    node:internal/process/task_queues:96:5

  - init-starter.js:135 install
    [npm]/[gatsby-cli]/lib/init-starter.js:135:7

  - init-starter.js:202 clone
    [npm]/[gatsby-cli]/lib/init-starter.js:202:3

  - init-starter.js:343 initStarter
    [npm]/[gatsby-cli]/lib/init-starter.js:343:5

  - create-cli.js:460
    [npm]/[gatsby-cli]/lib/create-cli.js:460:9

To Reproduce
Steps to reproduce the behavior:

  1. gatsby new blog https://github.com/alxshelepenok/gatsby-starter-lumen

Expected behavior
Should have installed the packages as expected.

Desktop (please complete the following information):

  • OS: Windows 10 Pro Version 10.0.19044
  • Browser: Chrome Version 99.0.4844.51

I got this to work by using Node 14.15 version.

Ran into the same issue with Node v16.14.2. v14.19.1 worked.

Thank you for your feedback. The starter has been updated to the new version and the bug has probably been fixed.