parmsang / gatsby-starter-ecommerce

Gatsby starter for creating an eCommerce site using the Moltin eCommerce Api
https://parmsang.github.io/gatsby-starter-ecommerce/
Other
502 stars 148 forks source link

Unable to update dependencies #53

Open hungrymonkey opened 3 years ago

hungrymonkey commented 3 years ago

Hi,

I attempted to replace a depreciated dependency gatsby-image because upstream replaced it with gatsby-plugin-image; however, I realize this task is impossible unless somebody modifies the dependencies to be gatsby 3.0 compatible. When you update gatsby-plugin-image, you also need to update gatsby to the 3.x.x branch which also breaks @moltin/gatsby-source-moltin. Unfortunately, @moltin/gatsby-source-moltin has a dependency named bluebird that throws these errors below. @moltin/gatsby-source-moltin has not been updated for over an year as the time of writing. Since bluebird is use with gatsby, I think it is the overly aggressive eslint to be causing the problem.

Tested with Node.js 16.7

 ERROR 

The "path" argument must be of type string. Received an instance of Object

  TypeError: The "path" argument must be of type string. Received an instance of Object

  - errors:371 new NodeError
    node:internal/errors:371:5

  - validators:119 validateString
    node:internal/validators:119:11

  - node:path:1172 Object.join
    node:path:1172:7

  - index.js:34 resolveTheme
    [gatsby-starter-ecommerce]/[gatsby]/src/bootstrap/load-themes/index.js:34:31

  - index.js:115 
    [gatsby-starter-ecommerce]/[gatsby]/src/bootstrap/load-themes/index.js:115:30

  - util.js:16 tryCatcher
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/util.js:16:23

  - reduce.js:166 Object.gotValue
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/reduce.js:166:18

  - reduce.js:155 Object.gotAccum
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/reduce.js:155:25

  - util.js:16 Object.tryCatcher
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/util.js:16:23

  - promise.js:547 Promise._settlePromiseFromHandler
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/promise.js:547:31

  - promise.js:604 Promise._settlePromise
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/promise.js:604:18

  - promise.js:649 Promise._settlePromise0
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/promise.js:649:10

  - promise.js:729 Promise._settlePromises
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/promise.js:729:18

  - async.js:93 _drainQueueStep
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/async.js:93:12

  - async.js:86 _drainQueue
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/async.js:86:9

  - async.js:102 Async._drainQueues
    [gatsby-starter-ecommerce]/[gatsby]/[bluebird]/js/release/async.js:102:5

not finished open and validate gatsby-configs, load plugins - 0.256s
npm list  bluebird
gatsby-starter-ecommerce@2.0.0 /git_repo/gatsby-starter-ecommerce
├─┬ @moltin/gatsby-source-moltin@1.9.1
│ └─┬ gatsby-source-filesystem@2.11.1
│   └─┬ gatsby@2.32.13
│     ├── bluebird@3.7.2
│     ├─┬ gatsby-plugin-page-creator@2.10.2
│     │ └─┬ gatsby-page-utils@0.9.1
│     │   └── bluebird@3.7.2 deduped
│     └─┬ webpack@4.46.0
│       └─┬ terser-webpack-plugin@1.4.5
│         └─┬ cacache@12.0.4
│           └── bluebird@3.7.2 deduped
├─┬ cypress@3.8.3
│ └── bluebird@3.5.0
├─┬ gatsby-plugin-sharp@3.12.0
│ └── bluebird@3.7.2
├─┬ gatsby-transformer-sharp@3.12.0
│ └── bluebird@3.7.2
├─┬ gatsby@3.12.0
│ ├── bluebird@3.7.2
│ └─┬ gatsby-plugin-page-creator@3.12.0
│   └─┬ gatsby-page-utils@1.12.0
│     └── bluebird@3.7.2
└─┬ start-server-and-test@1.13.1
  └── bluebird@3.7.2
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: gatsby-starter-ecommerce@2.0.0
npm ERR! Found: gatsby@2.32.13
npm ERR! node_modules/gatsby
npm ERR!   gatsby@"^2.29.3" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer gatsby@"^3.0.0-next.0" from gatsby-plugin-image@1.12.0
npm ERR! node_modules/gatsby-plugin-image
npm ERR!   gatsby-plugin-image@"^1.0.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 /Users/psuedofinnish/.npm/eresolve-report.txt for a full report.

https://www.gatsbyjs.com/plugins/gatsby-image/ https://www.gatsbyjs.com/docs/reference/release-notes/image-migration-guide/ https://www.npmjs.com/package/bluebird https://www.npmjs.com/package/@moltin/gatsby-source-moltin

parmsang commented 2 years ago

I realize this task is impossible unless somebody modifies the dependencies to be gatsby 3.0 compatible

I'm afraid I don't have any immediate plans to upgrade. I am happy to accept good quality PR's.